From 0b4d0a1e010cf93c4b9311c9ebf27c91bc2714cc Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Tue, 18 Jul 2006 11:09:44 +0000 Subject: [PATCH] Fixed buffer overflow on very-very long RTF paragraphs. --- src/rtfread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtfread.c b/src/rtfread.c index 902ee77..8ed1be6 100644 --- a/src/rtfread.c +++ b/src/rtfread.c @@ -171,7 +171,7 @@ int rtf_level=0; extern unsigned short int buffer[]; void add_to_buffer(int *bufptr,unsigned short int c) { buffer[++(*bufptr)]=c; - if (*bufptr > PARAGRAPH_BUFFER-2) { + if (*bufptr >= PARAGRAPH_BUFFER-2) { buffer[++(*bufptr)]=0; output_paragraph(buffer); *bufptr=-1; -- 2.39.5