]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix rastertoepson allocation bug in unused driver code (Issue #1537)
authorMichael R Sweet <msweet@msweet.org>
Mon, 13 Apr 2026 15:55:37 +0000 (11:55 -0400)
committerMichael R Sweet <msweet@msweet.org>
Mon, 13 Apr 2026 15:55:37 +0000 (11:55 -0400)
CHANGES.md
filter/rastertoepson.c

index b15d9739ece8ddd83f53a7f444c6777c33a1787c..b0ab9d2a06871c650b9bb2cdd47a9a9cc5872696 100644 (file)
@@ -165,6 +165,7 @@ v2.5b1 - YYYY-MM-DD
 - Fixed missing write check in `cupsFileOpen/Fd` (Issue #1360)
 - Fixed error recovery when scanning for PPDs in `cups-driverd` (Issue #1416)
 - Fixed allowed values for directive `FilterNice`
+- Fixed an allocation bug in the `rastertoepson` filter (Issue #1537)
 - Removed hash support for SHA2-512-224 and SHA2-512-256.
 - Removed `mantohtml` script for generating html pages (use
   `https://www.msweet.org/mantohtml/`)
index eb7e9e550a2518857950225427379f849e8b4ddf..5538e7b329ad4733838711af6c4128b82925a950 100644 (file)
@@ -298,7 +298,7 @@ StartPage(
 
   if (header->cupsCompression || DotBytes)
   {
-    if ((CompBuffer = calloc(2, header->cupsWidth + 1)) == NULL)
+    if ((CompBuffer = calloc(2, header->cupsBytesPerLine + 1)) == NULL)
     {
       fputs("ERROR: Unable to allocate memory\n", stderr);
       exit(1);