Hello! > This patch replaces the insufficient check with a more precise one. It > calculates the effective width in bytes of the image (accounting for > clipping against xres_virtual) and ensures that the last byte of the > operation falls within the screen buffer. Specifically, it checks if > '(dy + height - 1) * line_length + effective_width_bytes' exceeds > screen_size. If it does, the drawing height max_y is reduced to > prevent the out-of-bounds access. I know my opinion doesn't count much but would like make a note.
Any bound checks which are applied here or at the entry of the other 2
low level drawing routines are just masking an issue somewhere in the
console code. The text area should be entirely within bounds of the
screen memory. If that's always the case then there shouldn't be any
drawing request outside of the framebuffer either.
Please consider at least to add a warning instead of silent clipping, as
every time such clipping was done it was a result of a bug.
--
-soci-
OpenPGP_signature
Description: OpenPGP digital signature
