evas vg: use strncpy() instead of strcpy() for better security.

This commit is contained in:
Hermet Park 2019-02-18 14:47:14 +09:00
parent 3967e1f354
commit a8d5f275c7
1 changed files with 3 additions and 2 deletions

View File

@ -181,8 +181,9 @@ _vg_file_save(Vg_File_Data *vfd, const char *file, const char *key, const char *
char *p, *pp;
char *tflags;
tflags = alloca(strlen(flags) + 1);
strcpy(tflags, flags);
int len = strlen(flags);
tflags = alloca(len) + 1;
strncpy(tflags, flags, len);
p = tflags;
while (p)
{