summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 20:47:26 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 20:47:26 +0000
commit7cb91ab69dae944d8aeb0328145e36d8c6163050 (patch)
tree3057745d29a16e871d323e60d1a2dc025ce4acc4 /net/http
parent3f2b288cf6768ca528ffa8fdac47bfedab37f2e7 (diff)
downloadchromium_src-7cb91ab69dae944d8aeb0328145e36d8c6163050.zip
chromium_src-7cb91ab69dae944d8aeb0328145e36d8c6163050.tar.gz
chromium_src-7cb91ab69dae944d8aeb0328145e36d8c6163050.tar.bz2
Don't pass GSS_C_NO_CONTEXT into gss_inquire_context()
If the call to gss_init_sec_context() failed, the returned context handle could be NULL. Attempting to describe the context by calling gss_inquire_context() using the NULL handle can cause a crash in the Kerberos library. BUG=73145 TEST=none Review URL: https://chromiumcodereview.appspot.com/10535018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_auth_gssapi_posix.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc
index dabbc16..618a40b 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -346,6 +346,8 @@ std::string DescribeContext(GSSAPILibrary* gssapi_lib,
OM_uint32 ctx_flags = 0;
int locally_initiated = 0;
int open = 0;
+ if (context_handle == GSS_C_NO_CONTEXT)
+ return std::string("Context: GSS_C_NO_CONTEXT");
major_status = gssapi_lib->inquire_context(&minor_status,
context_handle,
&src_name,