[PATCH] Fix two CIDs

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Apr 16 13:53:54 UTC 2018


On Mon, Apr 16, 2018 at 03:31:21PM +0200, Volker Lendecke wrote:
> Wow, that's really complex logic. We should turn the tevent_req_nomem
> into tevent_req_oom as done elsewhere. This returns void.

Are you ok with this one?

Thanks, Volker

-- 
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 6aaa696b3a14986d413130990d065943235d7978 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 30 Mar 2018 12:22:57 -0500
Subject: [PATCH 1/2] tstream: Fix CID 1167982 Unchecked return value

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

diff --git a/libcli/smb/tstream_smbXcli_np.c b/libcli/smb/tstream_smbXcli_np.c
index a59db13321b..e039f9b165d 100644
--- a/libcli/smb/tstream_smbXcli_np.c
+++ b/libcli/smb/tstream_smbXcli_np.c
@@ -1010,7 +1010,7 @@ static void tstream_smbXcli_np_readv_trans_done(struct tevent_req *subreq)
 	cli_nps->read.buf = talloc_array(cli_nps, uint8_t, received);
 	if (cli_nps->read.buf == NULL) {
 		TALLOC_FREE(subreq);
-		tevent_req_nomem(cli_nps->read.buf, req);
+		tevent_req_oom(req);
 		return;
 	}
 	memcpy(cli_nps->read.buf, rcvbuf, received);
-- 
2.11.0


From 294d3ac9ac214c9e52b0902f0deaff2dcb7f4a6f Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 30 Mar 2018 12:23:47 -0500
Subject: [PATCH 2/2] tstream: Fix CID 1167981 Unchecked return value

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

diff --git a/libcli/smb/tstream_smbXcli_np.c b/libcli/smb/tstream_smbXcli_np.c
index e039f9b165d..8dfc4fb2466 100644
--- a/libcli/smb/tstream_smbXcli_np.c
+++ b/libcli/smb/tstream_smbXcli_np.c
@@ -1096,7 +1096,7 @@ static void tstream_smbXcli_np_readv_read_done(struct tevent_req *subreq)
 	cli_nps->read.buf = talloc_array(cli_nps, uint8_t, received);
 	if (cli_nps->read.buf == NULL) {
 		TALLOC_FREE(subreq);
-		tevent_req_nomem(cli_nps->read.buf, req);
+		tevent_req_oom(req);
 		return;
 	}
 	memcpy(cli_nps->read.buf, rcvbuf, received);
-- 
2.11.0



More information about the samba-technical mailing list