[PATCH xtest] Allow space in read buffer for CRLF and NUL

Peter Harris pharris at opentext.com
Tue Dec 4 15:38:18 PST 2012


tcc will limit output lines to 512 characters not including CRLF. In
addition, there needs to be space in the buffer for the trailing NUL
that fgets will append.

Without this change, xts-report will exit prematurely if it sees a
maximum length line.

Signed-off-by: Peter Harris <pharris at opentext.com>
---
 xts5/src/bin/reports/xts-report.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xts5/src/bin/reports/xts-report.c b/xts5/src/bin/reports/xts-report.c
index 8e4b1e4..c1ca468 100644
--- a/xts5/src/bin/reports/xts-report.c
+++ b/xts5/src/bin/reports/xts-report.c
@@ -219,7 +219,7 @@ int	fabort=0;
 /*message type*/
 int	mtype;
 /*messages read in here*/
-char	linebuf[512];
+char	linebuf[515];
 /*pointer into where we are in the message*/
 char	*pline;
 
-- 
1.7.2.5



More information about the xorg-devel mailing list