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/16 00:14:24 UTC
svn commit: r1895075 - /httpd/apreq/trunk/library/parser_multipart.c
Author: ylavic
Date: Tue Nov 16 00:14:24 2021
New Revision: 1895075
URL: http://svn.apache.org/viewvc?rev=1895075&view=rev
Log:
parser_multipart: Follow up to r1895020: correct test for the 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=1895075&r1=1895074&r2=1895075&view=diff
==============================================================================
--- httpd/apreq/trunk/library/parser_multipart.c (original)
+++ httpd/apreq/trunk/library/parser_multipart.c Tue Nov 16 00:14:24 2021
@@ -238,10 +238,8 @@ struct mfd_ctx * create_multipart_contex
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;