From: Michael R Sweet Date: Mon, 13 Apr 2026 15:55:37 +0000 (-0400) Subject: Fix rastertoepson allocation bug in unused driver code (Issue #1537) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80c8f478d5a353d61c330d4ff6e77c0ef9eaa7cf;p=thirdparty%2Fcups.git Fix rastertoepson allocation bug in unused driver code (Issue #1537) --- diff --git a/CHANGES.md b/CHANGES.md index b15d9739ec..b0ab9d2a06 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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/`) diff --git a/filter/rastertoepson.c b/filter/rastertoepson.c index eb7e9e550a..5538e7b329 100644 --- a/filter/rastertoepson.c +++ b/filter/rastertoepson.c @@ -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);