summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1999-01-08 20:37:48 +0000
committerJeremy Allison <jra@samba.org>1999-01-08 20:37:48 +0000
commit819645d7193878e013f3037c837fd1fc2cc3ae18 (patch)
treeaf79d13e93c062c0acc4ce96ce3a6303b6149dd9
parent38832b36d5626a0f314b88770306cd3ab2f3e580 (diff)
downloadsamba-819645d7193878e013f3037c837fd1fc2cc3ae18.tar.gz
samba-819645d7193878e013f3037c837fd1fc2cc3ae18.tar.xz
samba-819645d7193878e013f3037c837fd1fc2cc3ae18.zip
Check for a null pointer in smbw_path.
Jeremy.
-rw-r--r--source/smbwrapper/smbw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/smbwrapper/smbw.c b/source/smbwrapper/smbw.c
index 6ae6146ed22..b8071b45a0b 100644
--- a/source/smbwrapper/smbw.c
+++ b/source/smbwrapper/smbw.c
@@ -341,6 +341,9 @@ int smbw_path(const char *path)
char *cwd;
int len;
+ if(!path)
+ return 0;
+
/* this is needed to prevent recursion with the BSD malloc which
opens /etc/malloc.conf on the first call */
if (strncmp(path,"/etc/", 5) == 0) {