krb5_cc_default_name() can return NULL, but is passed directly to strcmp()

Daniel Atallah daniel.atallah at
Wed Jun 11 11:56:00 EDT 2008

I've been running into an issue where occasionally when there's a
network change, I'm running into a crash because a NULL pointer is
passed to strcmp().

To provide some background, I'm using the MIT Kerberos for Windows
GSSAPI (version 3.2.2) functionality in the GSSAPI plugin for

Immediately before the crash, an error popup is displayed saying:

Internal credentials cache error
(Kerberos error 196)
krb5_cc_next_cred() failed

The crash occurs as soon as I dismiss the popup.

A partially complete stacktrace is below; I'm not sure why it isn't
unwinding the last frames correctly to get to where the strcmp is
actually called, I've seen this sometimes with the utility i'm using
(exchndl.dll from the mingw-tools).
I think it is somehow getting messed up by the leash dll being loaded
Error occured on Tuesday, June 10, 2008 at 08:26:04.

Windows Version 5.1 Build 2600 Service Pack 2

C:\devel\pidgin-devel\build\pidgin.exe caused an Access Violation at
location 77c47740 in module C:\WINDOWS\system32\msvcrt.dll Reading
from location 00000000.

eax=00000000 ebx=06d3dc28 ecx=0022ea2c edx=00000000 esi=071642bc edi=0022eb2c
eip=77c47740 esp=0022e9d4 ebp=0022eb2c iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00210246

Call stack:
         C:\WINDOWS\system32\msvcrt.dll [7.0.2600.2180]
77C47740 C:\WINDOWS\system32\msvcrt.dll  strcmp
         C:\devel\pidgin-devel\build\gssapi32.dll []
1C002BF1 C:\devel\pidgin-devel\build\gssapi32.dll  acquire_init_cred
1C001FA5 C:\devel\pidgin-devel\build\gssapi32.dll
1C001620 C:\devel\pidgin-devel\build\gssapi32.dll  kg_get_defcred
1C00466C C:\devel\pidgin-devel\build\gssapi32.dll
1C00A4CF C:\devel\pidgin-devel\build\gssapi32.dll
1C00D83C C:\devel\pidgin-devel\build\gssapi32.dll
         C:\devel\pidgin-devel\build\sasl2\saslGSSAPI.dll []
01AD295A C:\devel\pidgin-devel\build\sasl2\saslGSSAPI.dll

I was going to report this to the krb5-bugs list, but I couldn't find
the krb5-send-pr program, so I figured I'd try here.

If I should be reporting this in a different way, please let me know.


More information about the krbdev mailing list