forked from enlightenment/efl
Check for data size. Should be done throught the whole function!
SVN revision: 31723
This commit is contained in:
parent
5b85440817
commit
ee2d0762f4
|
@ -885,7 +885,7 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
|
||||||
ptr = data;
|
ptr = data;
|
||||||
|
|
||||||
/* make sure we're a magic file */
|
/* make sure we're a magic file */
|
||||||
if (!ptr || strncmp(ptr, "MIME-Magic\0\n", 12))
|
if (!ptr || (size < 12) || strncmp(ptr, "MIME-Magic\0\n", 12))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ptr += 12;
|
ptr += 12;
|
||||||
|
|
Loading…
Reference in New Issue