]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
fix out-of-bounds read in rastertolabel delta-row compare 1644/head
authorAizal Khan <aizumusheer2@gmail.com>
Sun, 5 Jul 2026 08:19:07 +0000 (13:49 +0530)
committerAizal Khan <aizumusheer2@gmail.com>
Fri, 17 Jul 2026 10:10:47 +0000 (15:40 +0530)
Signed-off-by: Aizal Khan <aizumusheer2@gmail.com>
filter/rastertolabel.c

index 0434d159e8e195c29fda59799c6dd624d67de008..bee0f2aa8ec86f65b28aee88d7eddb3b8205d1b8 100644 (file)
@@ -953,8 +953,8 @@ PCLCompress(unsigned char *line,    /* I - Line to compress */
       * The seed buffer is valid, so compare against it...
       */
 
-      while (*line_ptr == *seed &&
-             line_ptr < line_end)
+      while (line_ptr < line_end &&
+             *line_ptr == *seed)
       {
         line_ptr ++;
         seed ++;
@@ -971,8 +971,8 @@ PCLCompress(unsigned char *line,    /* I - Line to compress */
 
       start = line_ptr;
       count = 0;
-      while (*line_ptr != *seed &&
-             line_ptr < line_end &&
+      while (line_ptr < line_end &&
+             *line_ptr != *seed &&
              count < 8)
       {
         line_ptr ++;