From ecd8cc4ef29327f205e76093fd744a837421fee6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Sep 2003 04:57:20 +0000 Subject: Apply some NULL pointer paranoia to previous wins hook fix. (This used to be commit 0281c5b764971c5300b99b82d89c812ded5a1335) --- source3/nmbd/nmbd_winsserver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3') 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", -- cgit