From: Yann Ylavic Date: Tue, 16 Nov 2021 00:15:22 +0000 (+0000) Subject: Sync r1895075 from libapreq. X-Git-Tag: 2.5.0-alpha2-ci-test-only~693 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21aa333b020052e0dd3bb3a934fdd69645ccfc63;p=thirdparty%2Fapache%2Fhttpd.git Sync r1895075 from libapreq. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895076 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/apreq_parser_multipart.c b/server/apreq_parser_multipart.c index a6c0151367a..9eed5a4e35e 100644 --- a/server/apreq_parser_multipart.c +++ b/server/apreq_parser_multipart.c @@ -238,10 +238,8 @@ struct mfd_ctx * create_multipart_context(const char *content_type, s = apreq_header_attribute(buf, "boundary", 8, (const char **)&ctx->bdry, &blen); - if (s != APR_SUCCESS) - return NULL; /* missing boundary */ - if (!ctx->bdry || !*ctx->bdry) - return NULL; /* boundary with no or empty value */ + if (s != APR_SUCCESS || !blen) + return NULL; /* missing or empty boundary */ ctx->bdry[blen] = 0;