summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-12-19 14:10:05 +0100
committerGünther Deschner <gd@samba.org>2012-12-21 13:56:01 +0100
commit93d2847bf4cc5d2fcdc95677d1cb1c515adc621c (patch)
tree30cbef0743109c00577b95ba6c976cbe5d351e6b
parent56eb4ab5f6280aa40c0e0edefad7f965b3f02a4a (diff)
downloadsamba-93d2847bf4cc5d2fcdc95677d1cb1c515adc621c.tar.gz
samba-93d2847bf4cc5d2fcdc95677d1cb1c515adc621c.tar.bz2
samba-93d2847bf4cc5d2fcdc95677d1cb1c515adc621c.zip
s3-libsmb: Remove check if array is NULL.
rdata is an array with data. rdlength defines how big rdata is. So if rdlength is not set we have a big problem. Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
-rw-r--r--source3/libsmb/nmblib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index a6816db5b9..4adc3da5fa 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -68,8 +68,9 @@ static void debug_nmb_res_rec(struct res_rec *res, const char *hdr)
res->rr_class,
res->ttl ) );
- if( res->rdlength == 0 || res->rdata == NULL )
+ if (res->rdlength == 0) {
return;
+ }
for (i = 0; i < res->rdlength; i+= MAX_NETBIOSNAME_LEN) {
DEBUGADD(4, (" %s %3x char ", hdr, i));