forked from enlightenment/efl
evas vg: use strncpy() instead of strcpy() for better security.
This commit is contained in:
parent
3967e1f354
commit
a8d5f275c7
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue