Skip to content
Snippets Groups Projects
Commit 47548800 authored by Yang Tse's avatar Yang Tse
Browse files

fix missing null-pointer check

parent 1fea66e5
No related branches found
No related tags found
No related merge requests found
......@@ -1501,8 +1501,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* user:password to use in the operation
*/
{
char* userpwd = va_arg(param, char *);
char* separator = strchr(userpwd, ':');
char* userpwd;
char* separator;
userpwd = va_arg(param, char *);
if(userpwd == NULL)
break;
separator = strchr(userpwd, ':');
if (separator != NULL) {
/* store username part of option */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment