* efreet: Prevent div by zero.

SVN revision: 42940
This commit is contained in:
Cedric BAIL 2009-10-07 12:57:13 +00:00
parent ef2d2ddfda
commit 703fb37368
1 changed files with 4 additions and 5 deletions

View File

@ -1125,11 +1125,10 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
case '~':
ptr++;
entry->word_size = atoi(ptr);
if (((entry->word_size != 0)
&& (entry->word_size != 1)
&& (entry->word_size != 2)
&& (entry->word_size != 4))
|| (entry->value_len % entry->word_size))
if ((entry->word_size != 0) && ((entry->word_size != 1)
&& (entry->word_size != 2)
&& (entry->word_size != 4)
|| (entry->value_len % entry->word_size)))
{
/* Invalid, Destroy */
FREE(entry->value);