2005-11-06 Peter Maydell <pmaydell@chiark.greenend.org.uk>
+ * Debian Bug# 245932, RedHat Bug# 172388: uip/mhparse.c: don't
+ crash when handling a multipart MIME message with an invalid
+ Content-Type header (file handle was being fclose()d twice).
+
* sbr/Makefile.in: adjust lex command to work on both old and
new versions of flex.
if (!(ct = get_content (fp, file, 1))) {
if (is_stdin)
unlink (file);
- fclose (fp);
advise (NULL, "unable to decode %s", file);
return NULL;
}
* toplevel = 0 # we are inside message type or multipart type
* # other than multipart/digest
* toplevel = -1 # we are inside multipart/digest
+ * NB: on failure we will fclose(in)!
*/
static CT
if (!(p = get_content (fp, ct->c_file,
ct->c_subtype == MULTI_DIGEST ? -1 : 0))) {
- fclose (ct->c_fp);
ct->c_fp = NULL;
return NOTOK;
}
fseek (fp = ct->c_fp, ct->c_begin, SEEK_SET);
if (!(p = get_content (fp, ct->c_file, 0))) {
- fclose (ct->c_fp);
ct->c_fp = NULL;
return NOTOK;
}