aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/postprocessor.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-02-26 17:51:24 +0100
committerChristian Grothoff <christian@grothoff.org>2023-02-26 17:51:39 +0100
commit6d6846e20bfdf4b3eb1b592c97520a532f724238 (patch)
tree7e7c4d5d3954bd72abfa0d39c4ab56845398fa17 /src/microhttpd/postprocessor.c
parent08f933a6ad2138ad0fad86496eb3ba88eaf3f173 (diff)
downloadlibmicrohttpd-6d6846e20bfdf4b3eb1b592c97520a532f724238.tar.gz
libmicrohttpd-6d6846e20bfdf4b3eb1b592c97520a532f724238.zip
fix parser bug that could be used to crash servers using the MHD_PostProcessor
Diffstat (limited to 'src/microhttpd/postprocessor.c')
-rw-r--r--src/microhttpd/postprocessor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index 99074215..c00605c7 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -83,7 +83,7 @@ MHD_create_post_processor (struct MHD_Connection *connection,
83 return NULL; /* failed to determine boundary */ 83 return NULL; /* failed to determine boundary */
84 boundary += MHD_STATICSTR_LEN_ ("boundary="); 84 boundary += MHD_STATICSTR_LEN_ ("boundary=");
85 blen = strlen (boundary); 85 blen = strlen (boundary);
86 if ( (blen == 0) || 86 if ( (blen < 2) ||
87 (blen * 2 + 2 > buffer_size) ) 87 (blen * 2 + 2 > buffer_size) )
88 return NULL; /* (will be) out of memory or invalid boundary */ 88 return NULL; /* (will be) out of memory or invalid boundary */
89 if ( (boundary[0] == '"') && 89 if ( (boundary[0] == '"') &&