X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e9eb8f7b32932b8add792e68d60386f97a44e1fb..04024c2cafab56ea76a9a2b35097584d6db98c06:/lib/mime.c diff --git a/lib/mime.c b/lib/mime.c index da41426..5db7585 100644 --- a/lib/mime.c +++ b/lib/mime.c @@ -381,15 +381,19 @@ int mime_multipart(const char *s, int ret; /* We must start with a boundary string */ - if(!isboundary(s, boundary, bl)) + if(!isboundary(s, boundary, bl)) { + error(0, "mime_multipart: first line is not the boundary string"); return -1; + } /* Keep going until we hit a final boundary */ while(!isfinal(s, boundary, bl)) { s = strstr(s, "\r\n") + 2; start = s; while(!isboundary(s, boundary, bl)) { - if(!(e = strstr(s, "\r\n"))) + if(!(e = strstr(s, "\r\n"))) { + error(0, "mime_multipart: line does not end CRLF"); return -1; + } s = e + 2; } if((ret = callback(xstrndup(start,