[PATCH xkbcomp 1/2] Removing unnecessary and unsafe code in scanchar()
Matthieu Herrb
matthieu.herrb at laas.fr
Sun Jan 16 00:54:29 PST 2011
On Sun, Jan 16, 2011 at 01:26:09AM +0500, Alexandr Shadchin wrote:
> 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
>
Reviewed-by: Matthieu Herrb <matthieu.herrb at laas.fr>
--
Matthieu Herrb
More information about the xorg-devel
mailing list