From 47bed1216dd93c96fe58ec0932a5821691d6f16c Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 11 Aug 2013 11:07:38 +0800 Subject: [PATCH] Kernel/PTY - Fixed NULL deref in kernel pty --- KernelLand/Kernel/drv/pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1