Fixed some svace issues 54/128954/1 accepted/tizen/unified/20170512.165708 submit/tizen/20170512.071139
authorhyunuktak <hyunuk.tak@samsung.com>
Fri, 12 May 2017 06:48:40 +0000 (15:48 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Fri, 12 May 2017 06:48:42 +0000 (15:48 +0900)
Change-Id: I9a85ac34568004adf2e81530440b047b5eaadc01
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/capi-network-stc.spec
test/stc_menu.c

index 035163f..4e01f85 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-network-stc
 Summary:    A Smart Traffic Control (STC) libraries in Native API
-Version:    0.0.4
+Version:    0.0.5
 Release:    1
 Group:      Network & Connectivity/API
 License:    Apache-2.0
index 16b4369..b03ad51 100755 (executable)
@@ -356,7 +356,7 @@ static void _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, 255 - strlen(buf) - 1);
 
                if ((i + 1) % 8 == 0) {
                        if ((i + 1) % 16 == 0) {
@@ -364,7 +364,7 @@ static void _hex_dump(const char *pad, int size, const void *data)
                                memset(buf, 0, 255);
                                snprintf(buf, 255, "%s%04X: ", pad, i + 1);
                        } else {
-                               strncat(buf, TAB_SPACE, strlen(TAB_SPACE));
+                               strncat(buf, TAB_SPACE, 255 - strlen(buf) - 1);
                        }
                }
        }