]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Range check cupsBytesPerLine in rastertoepson.
authorMichael R Sweet <msweet@msweet.org>
Sun, 5 Apr 2026 13:42:39 +0000 (09:42 -0400)
committerMichael R Sweet <msweet@msweet.org>
Sun, 5 Apr 2026 13:42:39 +0000 (09:42 -0400)
filter/rastertoepson.c

index ea092f612f544e41ca6d097fa7dc03adb341e33a..eb7e9e550a2518857950225427379f849e8b4ddf 100644 (file)
@@ -275,6 +275,12 @@ StartPage(
   else
     NumPlanes = 1;
 
+  if (header->cupsBytesPerLine < NumPlanes)
+  {
+    fputs("ERROR: Bad raster data.\n", stderr);
+    exit(1);
+  }
+
   Feed = 0;                            /* No blank lines yet */
 
  /*