[PATCH xkbcomp 1/2] Removing unnecessary and unsafe code in scanchar()
Alexandr Shadchin
alexandr.shadchin at gmail.com
Sat Jan 15 12:26:09 PST 2011
If readBufLen == BUFSIZE and feof() != 0, then go outside the boundaries
of buffer.
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
---
xkbscan.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/xkbscan.c b/xkbscan.c
index 03193e2..6d3678e 100644
--- a/xkbscan.c
+++ b/xkbscan.c
@@ -277,8 +277,6 @@ scanchar(void)
readBufPos = 0;
if (!readBufLen)
return EOF;
- if (feof(yyin))
- readBuf[readBufLen] = EOF;
}
return readBuf[readBufPos++];
--
1.7.3.5
More information about the xorg-devel
mailing list