wininet: Fix a possible NULL pointer deference.
This commit is contained in:
parent
0076e33d36
commit
e480b6d07d
|
@ -108,8 +108,13 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
|
|||
* dealing with 'Basic' Authentication
|
||||
*/
|
||||
p = strchrW( szBuf, ' ' );
|
||||
if( p && !strncmpW( p+1, szRealm, strlenW(szRealm) ) )
|
||||
if( !p || strncmpW( p+1, szRealm, strlenW(szRealm) ) )
|
||||
{
|
||||
ERR("proxy response wrong? (%s)\n", debugstr_w(szBuf));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* remove quotes */
|
||||
p += 7;
|
||||
if( *p == '"' )
|
||||
|
@ -119,8 +124,6 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
|
|||
if( q )
|
||||
*q = 0;
|
||||
}
|
||||
}
|
||||
|
||||
strcpyW( szBuf, p );
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue