libmicrohttpd

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

commit ba63b33aea997cdc94b379d29be203f39a32c4b6
parent 368991b0ee6b88fffcb4fd532d8d0fad4cc35742
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 15 Sep 2021 13:31:49 +0300

postprocessor: added asserts

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

diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c @@ -618,6 +618,7 @@ post_process_urlencoded (struct MHD_PostProcessor *pp, pp->state = PP_Error; break; case PP_Callback: + mhd_assert ((NULL != end_key) || (NULL == start_key)); if ( (pp->buffer_pos + (end_key - start_key) >= pp->buffer_size) || (pp->buffer_pos + (end_key - start_key) < @@ -674,6 +675,7 @@ post_process_urlencoded (struct MHD_PostProcessor *pp, /* save remaining data for next iteration */ if (NULL != start_key) { + mhd_assert ((PP_Init == pp->state) || (NULL != end_key)); if (NULL == end_key) end_key = &post_data[poff]; if (pp->buffer_pos + (end_key - start_key) >= pp->buffer_size)