fix checking rule of strncpy 67/74467/1 accepted/tizen/common/20160615.193312 accepted/tizen/ivi/20160615.001659 accepted/tizen/mobile/20160615.001802 accepted/tizen/tv/20160615.001727 submit/tizen/20160614.103947
authorHyunsoo, Park <hance.park@samsung.com>
Tue, 14 Jun 2016 09:26:15 +0000 (18:26 +0900)
committerHyunsoo, Park <hance.park@samsung.com>
Tue, 14 Jun 2016 09:26:15 +0000 (18:26 +0900)
Change-Id: Ib567cbb44bed4fb108b17bd81fe319ca511adcfb
Signed-off-by: Hyunsoo, Park <hance.park@samsung.com>
common/mm_wfd_sink_ini.c

index 02a7f23..24b7de4 100755 (executable)
@@ -47,7 +47,7 @@ static void __mm_wfd_sink_ini_check_status(void);
                if (str) { \
                        length = strlen(str); \
                        if ((length > 1) && (length < WFD_SINK_INI_MAX_STRLEN)) \
-                               strncpy(x_item, str, length+1); \
+                               strncpy(x_item, str, WFD_SINK_INI_MAX_STRLEN-1); \
                        else \
                                strncpy(x_item, x_default, WFD_SINK_INI_MAX_STRLEN-1); \
                } else { \