mirror of
https://github.com/moparisthebest/curl
synced 2025-01-09 13:08:00 -05:00
fix missing null-pointer check
This commit is contained in:
parent
1fea66e527
commit
4754880099
10
lib/url.c
10
lib/url.c
@ -1501,8 +1501,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
* user:password to use in the operation
|
* user:password to use in the operation
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
char* userpwd = va_arg(param, char *);
|
char* userpwd;
|
||||||
char* separator = strchr(userpwd, ':');
|
char* separator;
|
||||||
|
|
||||||
|
userpwd = va_arg(param, char *);
|
||||||
|
if(userpwd == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
|
separator = strchr(userpwd, ':');
|
||||||
if (separator != NULL) {
|
if (separator != NULL) {
|
||||||
|
|
||||||
/* store username part of option */
|
/* store username part of option */
|
||||||
|
Loading…
Reference in New Issue
Block a user