mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +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:
parent
56eb4ab5f6
commit
93d2847bf4
@ -68,8 +68,9 @@ static void debug_nmb_res_rec(struct res_rec *res, const char *hdr)
|
|||||||
res->rr_class,
|
res->rr_class,
|
||||||
res->ttl ) );
|
res->ttl ) );
|
||||||
|
|
||||||
if( res->rdlength == 0 || res->rdata == NULL )
|
if (res->rdlength == 0) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < res->rdlength; i+= MAX_NETBIOSNAME_LEN) {
|
for (i = 0; i < res->rdlength; i+= MAX_NETBIOSNAME_LEN) {
|
||||||
DEBUGADD(4, (" %s %3x char ", hdr, i));
|
DEBUGADD(4, (" %s %3x char ", hdr, i));
|
||||||
|
Loading…
Reference in New Issue
Block a user