Skip to content

scanimage: Fix 32-bit overflow when calculating total bytes to transfer

On high enough dpi the size of the total image will not fit within 32-bit integer. For example, a full-page 16-bit color scan at 4800 dpi is more than 10 gigabytes. We use 32-bit numbers in scanimage to represent total image size which would lead to unpredictable results on such large images. This PR fixes the issue.

Merge request reports