summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Harris <pharris@opentext.com>2012-12-04 18:34:46 -0500
committerPeter Harris <pharris@opentext.com>2012-12-13 16:15:27 -0500
commitf092cd48e4dbe8ba188973879b2b288e28dc5b35 (patch)
treef624b700b26e41c98061651dac79713d7c9f1a1c
parent4107983a76629aae28ad46adcbdef3636c515754 (diff)
Allow space in read buffer for CRLF and NUL
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. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Peter Harris <pharris@opentext.com>
-rw-r--r--xts5/src/bin/reports/xts-report.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xts5/src/bin/reports/xts-report.c b/xts5/src/bin/reports/xts-report.c
index 8e4b1e42..6f9d923a 100644
--- a/xts5/src/bin/reports/xts-report.c
+++ b/xts5/src/bin/reports/xts-report.c
@@ -219,7 +219,8 @@ int fabort=0;
/*message type*/
int mtype;
/*messages read in here*/
-char linebuf[512];
+/* max length 512, plus end-of-line, plus NUL terminator */
+char linebuf[515];
/*pointer into where we are in the message*/
char *pline;