Fix build warning based on GCC-9 93/221693/1
authormk5004.lee <mk5004.lee@samsung.com>
Tue, 7 Jan 2020 04:57:10 +0000 (13:57 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Tue, 7 Jan 2020 04:57:10 +0000 (13:57 +0900)
Change-Id: I8a85f7334b5f4ec99c027cc37cab5941c9a6b611
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
src/badge_internal.c
src/badge_setting_service.c

index 6d2b66a..434d0eb 100644 (file)
@@ -746,7 +746,7 @@ static bool _get_table_field_data_string(char **table, char **buf, int ucs2, int
                                goto out;
                        }
                        memset(*buf, 0, sLen + 1);
-                       strncpy(*buf, pTemp, sLen);
+                       strncpy(*buf, pTemp, sLen + 1);
                } else {
                        *buf = NULL; /* LCOV_EXCL_LINE */
                }
index fc2b0bd..66e7001 100644 (file)
@@ -89,7 +89,7 @@ static bool _get_table_field_data_string(char **table, char **buf, int ucs2, int
                                goto out;
                        }
                        memset(*buf, 0, sLen + 1);
-                       strncpy(*buf, pTemp, sLen);
+                       strncpy(*buf, pTemp, sLen + 1);
                } else {
                        *buf = NULL; /* LCOV_EXCL_LINE */
                }