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 *p, *pp;
|
||||||
char *tflags;
|
char *tflags;
|
||||||
|
|
||||||
tflags = alloca(strlen(flags) + 1);
|
int len = strlen(flags);
|
||||||
strcpy(tflags, flags);
|
tflags = alloca(len) + 1;
|
||||||
|
strncpy(tflags, flags, len);
|
||||||
p = tflags;
|
p = tflags;
|
||||||
while (p)
|
while (p)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue