summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-06 20:05:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:58 -0500
commit6d9c2b872f1552b7e1127f0b52f197e599fd9552 (patch)
tree8cd4bfdb0930ea98248be26ca58c7ae5a3b05b12
parent42df51222baad37dd2717036900120655551cc3e (diff)
downloadsamba-6d9c2b872f1552b7e1127f0b52f197e599fd9552.tar.gz
samba-6d9c2b872f1552b7e1127f0b52f197e599fd9552.tar.bz2
samba-6d9c2b872f1552b7e1127f0b52f197e599fd9552.zip
r13892: Doh ! My bugfix had a bug :-). Spotted by Willi Mann <willi@wm1.at>,
if rrec can be null make sure we *never* deref it. Jeremy. (This used to be commit d6d7a5ac62b6ee08e365c5982302b1d8dc69a78f)
-rw-r--r--source3/nmbd/nmbd_winsproxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_winsproxy.c b/source3/nmbd/nmbd_winsproxy.c
index a66290da6c..4f08b2fc5b 100644
--- a/source3/nmbd/nmbd_winsproxy.c
+++ b/source3/nmbd/nmbd_winsproxy.c
@@ -47,11 +47,11 @@ static void wins_proxy_name_query_request_success( struct subnet_record *subrec,
memcpy( (char *)&original_packet, &userdata->data[sizeof(struct subnet_record *)],
sizeof(struct packet_struct *) );
- nb_flags = get_nb_flags( rrec->rdata );
-
if (rrec) {
+ nb_flags = get_nb_flags( rrec->rdata );
num_ips = rrec->rdlength / 6;
} else {
+ nb_flags = 0;
num_ips = 0;
}