imlib_conv: Use proper buffer size to prevent invalid write of size one

This commit is contained in:
Fabian Keil 2014-12-02 15:40:25 +01:00 committed by Carsten Haitzler (Rasterman)
parent c21beaf178
commit 6e5d43617a
1 changed files with 1 additions and 1 deletions

View File

@ -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. */