From 951a43ea6c77436209c3dc974d8b18e5b2e87936 Mon Sep 17 00:00:00 2001 From: Philip Date: Thu, 30 Apr 2015 21:31:32 +0000 Subject: fix a potential end-of-buffer issue in tccelf.c also read characters one at a time when PARSE_DEBUG is set; after this patch, things seem to work with that. --- tccpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tccpp.c') diff --git a/tccpp.c b/tccpp.c index b44296d..0a99832 100644 --- a/tccpp.c +++ b/tccpp.c @@ -386,7 +386,7 @@ static int tcc_peekc_slow(BufferedFile *bf) if (bf->buf_ptr >= bf->buf_end) { if (bf->fd != -1) { #if defined(PARSE_DEBUG) - len = 8; + len = 1; #else len = IO_BUF_SIZE; #endif -- cgit v1.3.1