]> git.pld-linux.org Git - packages/autotrace.git/blob - autotrace-CVE-2019-19004.patch
- patch to fix .pc file, force ImageMagick (over GraphicsMagick default)
[packages/autotrace.git] / autotrace-CVE-2019-19004.patch
1 diff -urN autotrace-0.31.1.old/input-bmp.c autotrace-0.31.1/input-bmp.c
2 --- autotrace-0.31.1.old/input-bmp.c    2021-04-30 15:03:16.264446518 +0530
3 +++ autotrace-0.31.1/input-bmp.c        2021-04-30 15:06:14.682051209 +0530
4 @@ -220,6 +220,13 @@
5     * word length (32 bits == 4 bytes)
6     */
7  
8 +  unsigned long overflowTest = Bitmap_Head.biWidth * Bitmap_Head.biBitCnt;
9 +  if (overflowTest / Bitmap_Head.biWidth != Bitmap_Head.biBitCnt) {
10 +    LOG("Error reading BMP file header. Width is too large\n");
11 +    at_exception_fatal(&exp, "Error reading BMP file header. Width is too large");
12 +    goto cleanup;
13 +  }
14 +
15    rowbytes= ( (Bitmap_Head.biWidth * Bitmap_Head.biBitCnt - 1) / 32) * 4 + 4;  
16  
17  #ifdef DEBUG
This page took 0.054429 seconds and 3 git commands to generate.