Summary: | Division by Zero at devices/gdevdm24.c:185 in dot24_print_page | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Suhwan <prada960808> |
Component: | General | Assignee: | Julian Smith <julian.smith> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | poc |
Description
Suhwan
2019-11-02 15:19:19 UTC
The divisor is 'bytes_per_space' which is calculated as 'dots_per_space * 3'. The variable dots_per_space is 'xres / 10'. So when xres is less than 3 bytes_per_space becomes 0. Again this looks like the device is a fixed 360 dpi device, so we should throw a rangecheck on attempts to change the resolution. Its possible the device can accept mulitples of 360 (eg 12, 240 etc) but certainly we should not accept resolutions less than 3. Given these are dot matrix devices I'd be inclined to just freeze the resolution and wait to see if anyone complains. |