Fix build error 86/227586/1 tizen
authorsinikang <sinikang@samsung.com>
Fri, 13 Mar 2020 03:53:21 +0000 (12:53 +0900)
committersinikang <sinikang@samsung.com>
Fri, 13 Mar 2020 03:55:15 +0000 (12:55 +0900)
 - correct copying length of strncat()

Change-Id: I3b6d68732397aee8070be475cbdb47ec13086ef2
Signed-off-by: sinikang <sinikang@samsung.com>
packaging/tel-plugin-dongleinterface.spec
src/dongle_common.c

index 31ff4233296189228b54aa24ec580906c0cfb92e..6ac49698c99ad96a26e23e0f968c1aa80d7f6ec7 100644 (file)
@@ -1,6 +1,6 @@
 Name:          tel-plugin-dongleinterface
 Summary:       Dongle Interface plugin for CP interface
-Version:       0.2.25
+Version:       0.2.26
 Release:       1
 Group:         Development/Libraries
 License:       Apache-2.0
index 7da9ea570fed51b8bbadfe8e42bdf749dbea918a..7ec7989fae633f2b98a51ef7ee1c47838143c89c 100644 (file)
@@ -46,7 +46,7 @@ void util_hex_dump(const char *pad, int size, const void *data)
        snprintf(buf, 255, "%s%04X: ", pad, 0);
        for (i = 0; i < size; i++) {
                snprintf(hex, 4, "%02X ", p[i]);
-               strncat(buf, hex, strlen(hex));
+               strncat(buf, hex, sizeof(buf) - strlen(buf) - 1);
 
                if ((i + 1) % 8 == 0) {
                        if ((i + 1) % 16 == 0) {