Browse Source

Fixed bug #25918 (Possible crash in mime_content_type()).

PEAR_1_4DEV
Ilia Alshanetsky 23 years ago
parent
commit
30cc4dc8c9
  1. 5
      ext/mime_magic/mime_magic.c

5
ext/mime_magic/mime_magic.c

@ -1954,9 +1954,8 @@ static int magic_rsl_get(char **content_type, char **content_encoding)
}
/* detect memory allocation errors */
if (!content_type ||
(state == rsl_encoding && !*content_encoding)) {
return MIME_MAGIC_ERROR;
if (!content_type || !(*content_type) || (state == rsl_encoding && !*content_encoding)) {
return MIME_MAGIC_ERROR;
}
/* success! */

Loading…
Cancel
Save