r24320: Fix the wct checks in reply_trans2 and the reply_trans calls
authorVolker Lendecke <vlendec@samba.org>
Fri, 10 Aug 2007 21:34:55 +0000 (21:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:29:28 +0000 (12:29 -0500)
No idea what I've been smoking here.

Thanks to Stefan for closely looking
(This used to be commit 708f5af2e8c10d9a0d0027e3c31fa23689e746b8)

source3/smbd/ipc.c
source3/smbd/trans2.c

index b13c18a590593cd8fadefebd21c9f1064b5ffd90..240370692928a9636706b6e449febe6b6132d5b0 100644 (file)
@@ -488,7 +488,7 @@ void reply_trans(connection_struct *conn, struct smb_request *req)
 
        START_PROFILE(SMBtrans);
 
-       if (SVAL(req->inbuf, smb_wct) < 10) {
+       if (req->wct < 14) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                END_PROFILE(SMBtrans);
                return;
@@ -667,7 +667,7 @@ void reply_transs(connection_struct *conn, struct smb_request *req)
 
        show_msg((char *)req->inbuf);
 
-       if (req->wct < 10) {
+       if (req->wct < 8) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                END_PROFILE(SMBtranss);
                return;
index 26769e53d6d1741a28d844c46c463dba1d05ba96..f65d833ab06e86371a6cea1d354718c498c8845d 100644 (file)
@@ -7028,7 +7028,7 @@ void reply_trans2(connection_struct *conn, struct smb_request *req)
 
        START_PROFILE(SMBtrans2);
 
-       if (req->wct < 8) {
+       if (req->wct < 14) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                END_PROFILE(SMBtrans2);
                return;