[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1811-gf38c6b0

[email protected] (Julian Smith) Tue, 5 Nov 2019 13:48:33 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  f38c6b08c6582872af25fc669a5fd3bde9f32753 (commit)
      from  b25cad42dc869e8e9d7ea58adae2c8baba0ee25d (commit)

----------------------------------------------------------------------
commit f38c6b08c6582872af25fc669a5fd3bde9f32753
Author: Julian Smith <[email protected]>
Date:   Tue Nov 5 13:36:04 2019 +0000

    Bug 701831: fixed buffer overflow in bjc_compress().
    
    Fixes:
        ./sanbin/gs -dBATCH -dNOPAUSE -sOutputFile=tmp -sDEVICE=bjc800 ../bug-701831.ps

diff --git a/devices/gdevcdj.c b/devices/gdevcdj.c
index 1ab1c20..bfe60b5 100644
--- a/devices/gdevcdj.c
+++ b/devices/gdevcdj.c
@@ -1787,7 +1787,7 @@ bjc_compress(const byte *row, const byte *end_row, byte *compressed)
     register byte test, test2;
 
     test = *exam;
-    while ( exam < end_row ) {
+    while ( exam + 1 < end_row ) {
       test2 = *++exam;
       if ( test == test2 )
           break;


Summary of changes:
 devices/gdevcdj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)