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