diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-03 16:37:33 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-03 16:37:33 +0300 |
commit | 7e4885da25b58455452cd6dbcd167f761e3ff38e (patch) | |
tree | 73bfded4ea0f837b67e693cc397b78d96f66cd45 /src | |
parent | bcdff026967469e6c9cd1a22db80721712586a8e (diff) | |
download | libmicrohttpd-7e4885da25b58455452cd6dbcd167f761e3ff38e.tar.gz libmicrohttpd-7e4885da25b58455452cd6dbcd167f761e3ff38e.zip |
Fixed strlen(NULL) in bcdff026967469e6c9cd1a22db80721712586a8e
Diffstat (limited to 'src')
-rw-r--r-- | src/microhttpd/connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 78c36f07..ef3228a7 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -749,8 +749,8 @@ MHD_set_connection_value_n (struct MHD_Connection *connection, | |||
749 | struct MHD_HTTP_Header *pos; | 749 | struct MHD_HTTP_Header *pos; |
750 | 750 | ||
751 | if ( (MHD_GET_ARGUMENT_KIND != kind) && | 751 | if ( (MHD_GET_ARGUMENT_KIND != kind) && |
752 | ( (strlen(key) != key_size) || | 752 | ( ((key ? strlen(key) : 0) != key_size) || |
753 | (strlen(value) != value_size) ) ) | 753 | ((value ? strlen(value) : 0) != value_size) ) ) |
754 | return MHD_NO; /* binary zero is allowed only in GET arguments */ | 754 | return MHD_NO; /* binary zero is allowed only in GET arguments */ |
755 | 755 | ||
756 | pos = MHD_pool_allocate (connection->pool, | 756 | pos = MHD_pool_allocate (connection->pool, |