[poppler] poppler/DCTStream.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Jan 15 13:33:27 PST 2009


 poppler/DCTStream.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6e51ae7fe8b9dc8ad52b735f2fe056f8ea8f1dcb
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Jan 15 22:33:04 2009 +0100

    calculate the limit in a way that one does not access an invalid index of the matrix

diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc
index b7c2e10..3343342 100644
--- a/poppler/DCTStream.cc
+++ b/poppler/DCTStream.cc
@@ -156,7 +156,7 @@ int DCTStream::getChar() {
     {
       if (!jpeg_read_scanlines(&cinfo, row_buffer, 1)) return EOF;
       current = &row_buffer[0][0];
-      limit = &row_buffer[0][cinfo.output_width * cinfo.output_components];
+      limit = &row_buffer[0][(cinfo.output_width - 1) * cinfo.output_components] + cinfo.output_components;
     }
     else return EOF;
   }


More information about the poppler mailing list