[SCM] Samba Shared Repository - branch v3-5-test updated

Karolin Seeger kseeger at samba.org
Thu Mar 11 02:08:28 MST 2010


The branch, v3-5-test has been updated
       via  bf40d13... s3: Fix a NULL pointer dereference
      from  1c8e554... s3:winbindd: add DEBUG(10,...) for the end of each top level

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit bf40d130a1761daa14ce6a2cf3d02dbd9095c2b5
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 9 11:14:14 2010 +0100

    s3: Fix a NULL pointer dereference
    
    Found by Laurent Gaffie <laurent.gaffie at gmail.com>.
    
    Thanks!
    
    Volker
    (cherry picked from commit 25452a2268ac7013da28125f3df22085139af12d)
    
    Fix bug #7229 (NULL pointer dereference).

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/process.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 572f37d..3367d70 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1812,6 +1812,15 @@ void chain_reply(struct smb_request *req)
 	 */
 
 	if ((req->wct < 2) || (CVAL(req->outbuf, smb_wct) < 2)) {
+		if (req->chain_outbuf == NULL) {
+			req->chain_outbuf = TALLOC_REALLOC_ARRAY(
+				req, req->outbuf, uint8_t,
+				smb_len(req->outbuf) + 4);
+			if (req->chain_outbuf == NULL) {
+				smb_panic("talloc failed");
+			}
+		}
+		req->outbuf = NULL;
 		goto error;
 	}
 
@@ -1839,7 +1848,7 @@ void chain_reply(struct smb_request *req)
 		req->chain_outbuf = TALLOC_REALLOC_ARRAY(
 			req, req->outbuf, uint8_t, smb_len(req->outbuf) + 4);
 		if (req->chain_outbuf == NULL) {
-			goto error;
+			smb_panic("talloc failed");
 		}
 		req->outbuf = NULL;
 	} else {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list