forked from old/legacy-imlib2
imlib_conv: Use proper buffer size to prevent invalid write of size one
This commit is contained in:
parent
c21beaf178
commit
6e5d43617a
|
@ -59,7 +59,7 @@ main(int argc, char **argv)
|
|||
char *p, *q;
|
||||
|
||||
/* max length of 8 for format name. seems reasonable. */
|
||||
q = p = malloc(8);
|
||||
q = p = malloc(9);
|
||||
memset(p, 0, 8);
|
||||
strncpy(p, dot, (strlen(dot) < 9) ? strlen(dot) : 8);
|
||||
/* Imlib2 only recognizes lowercase formats. convert it. */
|
||||
|
|
Loading…
Reference in New Issue