Fix null pointer dereference in NTLM authentication
authorShane Kearns <shane.kearns@accenture.com>
Fri, 9 Dec 2011 11:49:50 +0000 (11:49 +0000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Dec 2011 12:34:11 +0000 (13:34 +0100)
commitb830c9cededf995fab1b0919a81658ceaec8d422
treee229323c82caa1501b7186629b773224521bc03f
parentd6fb4463b815a0fa21b6f087dc17ca3a45ee56e7
Fix null pointer dereference in NTLM authentication

If NTLM authentication is required for the URL with an empty path,
then QNetworkAuthenticationCache::findClosestMatch(url.path()) returns 0.
e.g. "http://10.1.2.3".
Return a default constructed credential in this case.

Change-Id: I84ad3b308ee3f74fbbac9ad0f11dbdc66047b50b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
src/network/access/qnetworkaccessauthenticationmanager.cpp