summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-18 17:21:31 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:12 +0100
commit52530f5c61994766fd4c85017fcf5287b2d16837 (patch)
tree707d00d3822b9a484619c0e4f3114c320562c2c3
parent742296d3c375630f76ced9970cff95d7bc1b2547 (diff)
downloadsamba-52530f5c61994766fd4c85017fcf5287b2d16837.tar.gz
samba-52530f5c61994766fd4c85017fcf5287b2d16837.tar.bz2
samba-52530f5c61994766fd4c85017fcf5287b2d16837.zip
nmbd: Fix request data data processing.
answers->rdata is an array and will never be NULL. Reviewed-by: Alexander Bokovoy <ab@samba.org>
-rw-r--r--source3/nmbd/nmbd_browsesync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c
index 8bc28ad301..30d2891a86 100644
--- a/source3/nmbd/nmbd_browsesync.c
+++ b/source3/nmbd/nmbd_browsesync.c
@@ -194,7 +194,7 @@ static void domain_master_node_status_success(struct subnet_record *subrec,
/* Go through the list of names found at answers->rdata and look for
the first SERVER<0x20> name. */
- if(answers->rdata != NULL) {
+ if (answers->rdlength > 0) {
char *p = answers->rdata;
int numnames = CVAL(p, 0);
@@ -416,7 +416,7 @@ static void get_domain_master_name_node_status_success(struct subnet_record *sub
* the first WORKGROUP<0x1b> name.
*/
- if(answers->rdata != NULL) {
+ if (answers->rdlength > 0) {
char *p = answers->rdata;
int numnames = CVAL(p, 0);