libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit f10d7c71ab440f91aa51f1b903499a8017dfb68e
parent b4165ecc099737bb26ea2daa443807fd04458a97
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed,  8 Jul 2026 12:09:38 +0200

fix overflow check

Diffstat:
Msrc/microhttpd/postprocessor.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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;