mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
don't segfault when NULL is passed in to CURLOPT_USERPWD or
CURLOPT_PROXYUSERPWD
This commit is contained in:
parent
a9a4300a36
commit
54582bdce9
@ -286,6 +286,9 @@ static CURLcode setstropt_userpwd(char *option, char **user_storage,
|
|||||||
char* separator;
|
char* separator;
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
|
|
||||||
|
if(!option)
|
||||||
|
return result;
|
||||||
|
|
||||||
separator = strchr(option, ':');
|
separator = strchr(option, ':');
|
||||||
if (separator != NULL) {
|
if (separator != NULL) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user