diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c index 5f258a6b..6e6bfbd1 100644 --- a/src/microhttpd/postprocessor.c +++ b/src/microhttpd/postprocessor.c @@ -532,7 +532,8 @@ post_process_urlencoded (struct MHD_PostProcessor *pp, mhd_assert (end_key >= start_key); key_len = (size_t) (end_key - start_key); mhd_assert (0 != key_len); /* it must be always non-zero here */ - if (pp->buffer_pos + key_len >= pp->buffer_size) + if ( (pp->buffer_pos + key_len >= pp->buffer_size) || + (pp->buffer_pos + key_len < pp->buffer_pos) ) { pp->state = PP_Error; return MHD_NO;