cups/SOURCES/cups-rastertoepson-crash.patch
2021-09-09 15:50:03 +00:00

14 lines
507 B
Diff

diff --git a/filter/rastertoepson.c b/filter/rastertoepson.c
index 4efe669..e8fe0c6 100644
--- a/filter/rastertoepson.c
+++ b/filter/rastertoepson.c
@@ -307,7 +307,7 @@ StartPage(
if (DotBytes)
{
- if ((LineBuffers[0] = calloc((size_t)DotBytes, header->cupsWidth * (size_t)(Shingling + 1))) == NULL)
+ if ((LineBuffers[0] = calloc((size_t)DotBytes, (header->cupsWidth + 7) * (size_t)(Shingling + 1))) == NULL)
{
fputs("ERROR: Unable to allocate memory\n", stderr);
exit(1);