Kernel/PTY - Fixed NULL deref in kernel pty
authorJohn Hodge <[email protected]>
Sun, 11 Aug 2013 03:07:38 +0000 (11:07 +0800)
committerJohn Hodge <[email protected]>
Sun, 11 Aug 2013 03:07:38 +0000 (11:07 +0800)
KernelLand/Kernel/drv/pty.c

index 1d1bdf3..f9f6262 100644 (file)
@@ -319,7 +319,7 @@ size_t PTY_int_WriteInput(tPTY *PTY, const char *Input, size_t Length)
        Mutex_Release(&PTY->InputMutex);
 
        VFS_MarkAvaliable(&PTY->ClientNode, 1);
-       if(ret < Length)
+       if(ret < Length && PTY->ServerNode)
                VFS_MarkFull(PTY->ServerNode, 1);       
 
        return ret;

UCC git Repository :: git.ucc.asn.au