From: John Hodge Date: Sun, 11 Aug 2013 03:07:38 +0000 (+0800) Subject: Kernel/PTY - Fixed NULL deref in kernel pty X-Git-Tag: rel0.15~280 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=47bed1216dd93c96fe58ec0932a5821691d6f16c;p=tpg%2Facess2.git Kernel/PTY - Fixed NULL deref in kernel pty --- diff --git a/KernelLand/Kernel/drv/pty.c b/KernelLand/Kernel/drv/pty.c index 1d1bdf35..f9f62629 100644 --- a/KernelLand/Kernel/drv/pty.c +++ b/KernelLand/Kernel/drv/pty.c @@ -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;