summaryrefslogtreecommitdiffstats
path: root/src/windows/leashdll
diff options
context:
space:
mode:
authorSam Hartman <hartmans@mit.edu>2011-09-28 20:54:49 +0000
committerSam Hartman <hartmans@mit.edu>2011-09-28 20:54:49 +0000
commit259668e4970e05226efa1807303d3adfbb35df4a (patch)
treee1609b6a1edd690cf80ac5bf8fe57745e8313101 /src/windows/leashdll
parentd280888e38ef7c3e9fdccf6329db9a8fd7f3290e (diff)
downloadkrb5-259668e4970e05226efa1807303d3adfbb35df4a.tar.gz
krb5-259668e4970e05226efa1807303d3adfbb35df4a.tar.xz
krb5-259668e4970e05226efa1807303d3adfbb35df4a.zip
if krb5_get_default_config_files() returns success and
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
Diffstat (limited to 'src/windows/leashdll')
-rw-r--r--src/windows/leashdll/lshfunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/windows/leashdll/lshfunc.c b/src/windows/leashdll/lshfunc.c
index a9c7c0d4c..91920e0ec 100644
--- a/src/windows/leashdll/lshfunc.c
+++ b/src/windows/leashdll/lshfunc.c
@@ -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';