# HG changeset patch # User Mychaela Falconia # Date 1683354806 0 # Node ID 1857d0d5a7bdd9472eea2dfaf9e4294b3aaebd7b # Parent 05651a1b8ba87c69bddb91df2124e92854e65a16 f-demime: fix parsing of Content-* headers diff -r 05651a1b8ba8 -r 1857d0d5a7bd f-demime/header_end.c --- a/f-demime/header_end.c Sat May 06 06:20:46 2023 +0000 +++ b/f-demime/header_end.c Sat May 06 06:33:26 2023 +0000 @@ -114,10 +114,11 @@ parse_content_type(type, subtype, charset, boundary) char *type, *subtype, *charset, *boundary; { - char *ctstr = cont_type_buf; + char *ctstr; char tokbuf[HDR_BUF_SIZE], attr[HDR_BUF_SIZE]; int rc; + ctstr = index(cont_type_buf, ':') + 1; if (gettoken(&ctstr, type) != 1) return(-1); if (gettoken(&ctstr, tokbuf) != '/') @@ -150,9 +151,10 @@ parse_content_te(ctetoken) char *ctetoken; { - char *ctestr = cont_te_buf; + char *ctestr; char tokbuf[HDR_BUF_SIZE]; + ctestr = index(cont_te_buf, ':') + 1; if (gettoken(&ctestr, ctetoken) != 1) return(-1); if (gettoken(&ctestr, tokbuf) == 0)