Blame SOURCES/autotrace-0.31.1-CVE-2022-32323.patch

683619
--- autotrace-0.31.1.old/input-bmp.c	2022-09-05 14:41:15.694254375 +0530
683619
+++ autotrace-0.31.1/input-bmp.c	2022-09-08 17:11:28.131973020 +0530
683619
@@ -88,7 +88,7 @@
683619
 		  at_address msg_data)
683619
 {
683619
   FILE *fd;
683619
-  unsigned char buffer[64];
683619
+  unsigned char buffer[128];
683619
   int ColormapSize, rowbytes, Maps, Grey;
683619
   unsigned char ColorMap[256][3];
683619
   at_bitmap_type image = at_bitmap_init(0, 0, 0, 1);
683619
@@ -345,6 +345,10 @@
683619
                *(temp++)= buffer[xpos * 4 + 1];
683619
                *(temp++)= buffer[xpos * 4];
683619
             }
683619
+
683619
+          if (ypos == 0)
683619
+	    break;
683619
+
683619
           --ypos; /* next line */
683619
         }
683619
     }
683619
@@ -361,6 +365,10 @@
683619
                *(temp++)= buffer[xpos * 3 + 1];
683619
                *(temp++)= buffer[xpos * 3];
683619
             }
683619
+            
683619
+          if (ypos == 0)
683619
+	    break;
683619
+
683619
           --ypos; /* next line */
683619
         }
683619
 	}
683619
@@ -378,6 +386,10 @@
683619
                *(temp++)= (unsigned char)(((rgb >> 5)  & 0x1f) * 8);
683619
                *(temp++)= (unsigned char)(((rgb)       & 0x1f) * 8);
683619
             }
683619
+
683619
+          if (ypos == 0)
683619
+	    break;
683619
+
683619
           --ypos; /* next line */
683619
         }
683619
     }