libmicrohttpd

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

commit 7e4885da25b58455452cd6dbcd167f761e3ff38e
parent bcdff026967469e6c9cd1a22db80721712586a8e
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Fri,  3 May 2019 16:37:33 +0300

Fixed strlen(NULL) in bcdff026967469e6c9cd1a22db80721712586a8e

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

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -749,8 +749,8 @@ MHD_set_connection_value_n (struct MHD_Connection *connection, struct MHD_HTTP_Header *pos; if ( (MHD_GET_ARGUMENT_KIND != kind) && - ( (strlen(key) != key_size) || - (strlen(value) != value_size) ) ) + ( ((key ? strlen(key) : 0) != key_size) || + ((value ? strlen(value) : 0) != value_size) ) ) return MHD_NO; /* binary zero is allowed only in GET arguments */ pos = MHD_pool_allocate (connection->pool,