summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-09-29 04:57:20 +0000
committerTim Potter <tpot@samba.org>2003-09-29 04:57:20 +0000
commitecd8cc4ef29327f205e76093fd744a837421fee6 (patch)
treed78b9b980cf8fa886f32fb4a05f6ccad9c5881b6 /source3/nmbd
parent1148875a1586ee232f40422ba776af71594c70fb (diff)
downloadsamba-ecd8cc4ef29327f205e76093fd744a837421fee6.tar.gz
samba-ecd8cc4ef29327f205e76093fd744a837421fee6.tar.bz2
samba-ecd8cc4ef29327f205e76093fd744a837421fee6.zip
Apply some NULL pointer paranoia to previous wins hook fix.
(This used to be commit 0281c5b764971c5300b99b82d89c812ded5a1335)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_winsserver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 804a5aad57..3694072420 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -122,8 +122,8 @@ static void wins_hook(const char *operation, struct name_record *namerec, int tt
/* Use the name without the nametype (and scope) appended */
namestr = nmb_namestr(&namerec->name);
- p = strchr(namestr, '<');
- *p = 0;
+ if ((p = strchr(namestr, '<')))
+ *p = 0;
p = command;
p += slprintf(p, sizeof(command)-1, "%s %s %s %02x %d",