[PATCH] Fix a Coverity finding

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jan 24 12:00:48 UTC 2018


Hi!

Review appreciated!

Thanks, Volker

-- 
Besuchen Sie die verinice.XP 2018 in Berlin,
Anwenderkonferenz für Informationssicherheit
vom 21.-23.03.2018 im Sofitel Kurfürstendamm
Info & Anmeldung hier: http://veriniceXP.org

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 956282b779d7f88ed76762af0c4bcea1a93f3185 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 24 Jan 2018 12:57:43 +0100
Subject: [PATCH] libnmb: Fix CID 1428474 Incorrect expression
 (COPY_PASTE_ERROR)

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/libsmb/nmblib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index bac43400b3a..5bfc129ebf5 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -840,7 +840,7 @@ static struct packet_struct *copy_packet_talloc(
 			ndst->additional = talloc_memdup(
 				pkt, nsrc->additional,
 				sizeof(struct res_rec) * nsrc->header.arcount);
-			if (ndst->nsrecs == NULL) {
+			if (ndst->additional == NULL) {
 				goto fail;
 			}
 		}
-- 
2.11.0



More information about the samba-technical mailing list