MXS-1220: Fix possible crash on NULL option value
When a request option without a value is given, microhttpd exposes this as key with a NULL value.
This commit is contained in:
@ -35,7 +35,7 @@ static int value_iterator(void *cls,
|
||||
{
|
||||
std::pair<std::string, std::string>* cmp = (std::pair<std::string, std::string>*)cls;
|
||||
|
||||
if (strcasecmp(cmp->first.c_str(), key) == 0)
|
||||
if (strcasecmp(cmp->first.c_str(), key) == 0 && value)
|
||||
{
|
||||
cmp->second = value;
|
||||
return MHD_NO;
|
||||
|
Reference in New Issue
Block a user