1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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>
This commit is contained in:
Andreas Schneider 2012-12-19 14:10:05 +01:00 committed by Günther Deschner
parent 56eb4ab5f6
commit 93d2847bf4

View File

@ -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));