r4382: check for bad tid in SMBtdis
authorAndrew Tridgell <tridge@samba.org>
Tue, 28 Dec 2004 23:26:29 +0000 (23:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:40 +0000 (13:07 -0500)
(This used to be commit 44ca3f41cc835e22e6adca48ddfd84f246b22bfb)

source4/smb_server/reply.c

index be5120c991a8416f64e63accc80d7fc2afd7b8fe..980f48bf57e97d985254a96c7f1618ed6ee1f1a3 100644 (file)
@@ -1355,6 +1355,11 @@ void reply_tdis(struct smbsrv_request *req)
 {
        REQ_CHECK_WCT(req, 0);
 
+       if (req->tcon == NULL) {
+               req_reply_error(req, NT_STATUS_INVALID_HANDLE);
+               return;
+       }
+
        close_cnum(req->tcon);
 
        /* construct reply */