Skip to content

Commit c338124

Browse files
committed
Range check cupsBytesPerLine in rastertoepson.
1 parent 2f372b2 commit c338124

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Changes in CUPS v2.4.17 (YYYY-MM-DD)
3232
- Fixed a bug when then `ippFindXxx` and `ippSetXxx` functions were mixed.
3333
- Fixed the mapping of supply type keywords to SNMP names.
3434
- Fixed a bug in the IPP backend when SNMP was disabled.
35+
- Fixed a crash bug in the rastertoepson filter.
3536

3637

3738
Changes in CUPS v2.4.16 (2025-12-04)

filter/rastertoepson.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ StartPage(
275275
else
276276
NumPlanes = 1;
277277

278+
if (header->cupsBytesPerLine < NumPlanes)
279+
{
280+
fputs("ERROR: Bad raster data.\n", stderr);
281+
exit(1);
282+
}
283+
278284
Feed = 0; /* No blank lines yet */
279285

280286
/*

0 commit comments

Comments
 (0)