Skip to content

PSOutputDev: Don't read outside of image buffer

This commit fixes issue #751 (closed) for me. I've found out that the reading outside of buffer is just 1 byte long. This is because the RGB data are considered CMYK data and hence it reads 4 bytes instead of 3 bytes at the end of the image (whole resulting image is wrong, just the last byte is worse :) ).

The patch checks whether the image is RGB or BGR and reads only 3 bytes in that case. It does not cover other cases like XRGB since I think that these are quite unlikely and the overflow has been already avoided.

Fixes #751 (closed)

Merge request reports