Check for data size. Should be done throught the whole function!

SVN revision: 31723
This commit is contained in:
Sebastian Dransfeld 2007-09-15 09:51:19 +00:00
parent 5b85440817
commit ee2d0762f4
1 changed files with 1 additions and 1 deletions

View File

@ -885,7 +885,7 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
ptr = data;
/* 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;
ptr += 12;