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