elm prefs cc - warn - use memcpy instead since we are really truncating
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 7 Nov 2018 15:17:14 +0000 (15:17 +0000)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 20 Nov 2018 06:56:20 +0000 (15:56 +0900)
fix strncpy warning... and use memcpy as we are explicitly truncating.
we mean it.

src/bin/elementary/elm_prefs_cc_parse.c

index b86ab64..11415e1 100644 (file)
@@ -277,7 +277,7 @@ next_token(char *p, char *end, char **new_p, int *delim)
                       file_in, line - 1, l + 1);
                   exit(-1);
                }
-             strncpy(tmpstr, p, l);
+             memcpy(tmpstr, p, l);
              tmpstr[l] = 0;
              if (l >= (int)sizeof(fl))
                {