From: sinikang Date: Fri, 13 Mar 2020 03:53:21 +0000 (+0900) Subject: Fix build error X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen;p=platform%2Fcore%2Ftelephony%2Ftel-plugin-dongleinterface.git Fix build error - correct copying length of strncat() Change-Id: I3b6d68732397aee8070be475cbdb47ec13086ef2 Signed-off-by: sinikang --- diff --git a/packaging/tel-plugin-dongleinterface.spec b/packaging/tel-plugin-dongleinterface.spec index 31ff423..6ac4969 100644 --- a/packaging/tel-plugin-dongleinterface.spec +++ b/packaging/tel-plugin-dongleinterface.spec @@ -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 diff --git a/src/dongle_common.c b/src/dongle_common.c index 7da9ea5..7ec7989 100644 --- a/src/dongle_common.c +++ b/src/dongle_common.c @@ -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) {