]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Sync r1895075 from libapreq.
authorYann Ylavic <ylavic@apache.org>
Tue, 16 Nov 2021 00:15:22 +0000 (00:15 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 16 Nov 2021 00:15:22 +0000 (00:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895076 13f79535-47bb-0310-9956-ffa450edef68

server/apreq_parser_multipart.c

index a6c0151367a8c53c41ce586e84bd2f07476c81c5..9eed5a4e35e30a8f7f4581c876e9035d1debba81 100644 (file)
@@ -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;