From: Volker Lendecke Date: Fri, 24 Feb 2012 15:02:02 +0000 (+0100) Subject: s3: Turn some SMB_ASSERTS into proper return X-Git-Tag: tdb-1.2.10~640 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=947a8bc44afc47961e2477ce0b7d8a16573b0f97;p=thirdparty%2Fsamba.git s3: Turn some SMB_ASSERTS into proper return We deal with the error properly further up --- diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 06f3e06be13..3214cbae0ce 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1745,7 +1745,9 @@ static bool find_andx_cmd_ofs(uint8_t *buf, size_t *pofs) cmd = CVAL(buf, smb_com); - SMB_ASSERT(is_andx_req(cmd)); + if (!is_andx_req(cmd)) { + return false; + } ofs = smb_vwv0; @@ -1761,7 +1763,9 @@ static bool find_andx_cmd_ofs(uint8_t *buf, size_t *pofs) */ ofs = SVAL(buf, ofs+2) + 4 + 1; - SMB_ASSERT(ofs+4 < talloc_get_size(buf)); + if (ofs+4 >= talloc_get_size(buf)) { + return false; + } } *pofs = ofs;