Skip to content

Commit

Permalink
if krb5_get_default_config_files() returns success and
Browse files Browse the repository at this point in the history
an empty list, then get_profile_file() will attempt
to dereference a null pointer.  check for the empty
list and treat it as failure.

Patch by Jeffrey Altman.

From: Alexey Melnikov <alexey.melnikov@isode.com>

leashw32: get_profile_file

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25250 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information
hartmans committed Sep 28, 2011
1 parent d280888 commit 259668e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/windows/leashdll/lshfunc.c
Expand Up @@ -1553,7 +1553,7 @@ get_profile_file(LPSTR confname, UINT szConfname)
{
char **configFile = NULL;
if (hKrb5) {
if (pkrb5_get_default_config_files(&configFile))
if (pkrb5_get_default_config_files(&configFile) || !configFile[0])
{
GetWindowsDirectory(confname,szConfname);
confname[szConfname-1] = '\0';
Expand Down

0 comments on commit 259668e

Please sign in to comment.