mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
fbcon: fix rotate upside down crash
Fix the rotate_ud() function not to crash in case of a font which has not a width of multiple by 8: The inner loop of the font pixel copy should not access a bit outside the font memory area. Subtract the shift offset from the font width will prevent this. Signed-off-by: Stefani Seibold <[email protected]> Cc: Krzysztof Helt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
69dd647f96
commit
93274e4d4e
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)
|
|||
width = (width + 7) & ~7;
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
for (j = 0; j < width - shift; j++) {
|
||||
if (pattern_test_bit(j, i, width, in))
|
||||
pattern_set_bit(width - (1 + j + shift),
|
||||
height - (1 + i),
|
||||
|
|
|
|||
Loading…
Reference in a new issue