File CVE-2022-32323.patch of Package autotrace
diff --git a/input-bmp.c b/input-bmp.c
index c32ed29..222851e 100644
--- a/input-bmp.c
+++ b/input-bmp.c
@@ -345,6 +345,10 @@ ReadImage (FILE *fd,
*(temp++)= buffer[xpos * 4 + 1];
*(temp++)= buffer[xpos * 4];
}
+
+ if (ypos == 0)
+ break;
+
--ypos; /* next line */
}
}
@@ -361,6 +365,10 @@ ReadImage (FILE *fd,
*(temp++)= buffer[xpos * 3 + 1];
*(temp++)= buffer[xpos * 3];
}
+
+ if (ypos == 0)
+ break;
+
--ypos; /* next line */
}
}
@@ -378,6 +386,10 @@ ReadImage (FILE *fd,
*(temp++)= (unsigned char)(((rgb >> 5) & 0x1f) * 8);
*(temp++)= (unsigned char)(((rgb) & 0x1f) * 8);
}
+
+ if (ypos == 0)
+ break;
+
--ypos; /* next line */
}
}