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

Aaron Plattner aplattner at nvidia.com
Thu Dec 6 15:38:56 PST 2012


I'll take your word for it that tcc does what the message says.

A comment above linebuf mentioning why it's 515 bytes might be nice, but 
in any case,

Reviewed-by: Aaron Plattner <aplattner at nvidia.com>

On 12/04/2012 03:38 PM, Peter Harris wrote:
> 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;
>
>



More information about the xorg-devel mailing list