You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2021/11/14 11:18:31 UTC

svn commit: r1895020 - /httpd/apreq/trunk/library/parser_multipart.c

Author: ylavic
Date: Sun Nov 14 11:18:31 2021
New Revision: 1895020

URL: http://svn.apache.org/viewvc?rev=1895020&view=rev
Log:
parser_multipart: Follow up to r1894983: disallow empty boundary.


Modified:
    httpd/apreq/trunk/library/parser_multipart.c

Modified: httpd/apreq/trunk/library/parser_multipart.c
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/library/parser_multipart.c?rev=1895020&r1=1895019&r2=1895020&view=diff
==============================================================================
--- httpd/apreq/trunk/library/parser_multipart.c (original)
+++ httpd/apreq/trunk/library/parser_multipart.c Sun Nov 14 11:18:31 2021
@@ -240,6 +240,8 @@ struct mfd_ctx * create_multipart_contex
                                (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 */
 
     ctx->bdry[blen] = 0;