From: Justin Erenkrantz Date: Wed, 6 Feb 2002 02:20:13 +0000 (+0000) Subject: If the MIME-continuation line returns nothing, then we should return not X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6637e25ad7cddb09dba07b67a854c3e626956d7d;p=apache If the MIME-continuation line returns nothing, then we should return not segfault. (A minor change to Jeff's patch is that we ignore the EBCDIC code path.) Submitted by: Jeff Trawick Reviewed by: Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93269 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index e87b903c0e..d0e1ae26f4 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -401,6 +401,12 @@ AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n, return rv; } + if (APR_BRIGADE_EMPTY(bb)) { + *read = bytes_handled; + apr_brigade_destroy(bb); + return APR_SUCCESS; + } + e = APR_BRIGADE_FIRST(bb); /* If we see an EOS, don't bother doing anything more. */