From: Alan Cox Date: Fri, 16 Jan 2015 20:45:32 +0000 (+0000) Subject: filesys: correct invalid ptr check X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d55fde301a9e582474fadcdccde585b80eab4ce8;p=FUZIX.git filesys: correct invalid ptr check --- diff --git a/Kernel/filesys.c b/Kernel/filesys.c index 84991e96..da1c81f2 100644 --- a/Kernel/filesys.c +++ b/Kernel/filesys.c @@ -342,7 +342,7 @@ void filename(char *userspace_upath, char *name) char *ptr; buf = tmpbuf(); - if(ugets(userspace_upath, buf, 512)) { + if(ugets(userspace_upath, buf, 512) == -1) { brelse(buf); *name = '\0'; return; /* An access violation reading the name */