Commit b067537
committed
fbdev: bitblit: fix bound-check glyph index in bit_putcs for cjktty
deepin inclusion
category: bugfix
charcount in cjk 16*16 and cjk 32*32 is 65536 * 2,
so do this logic to map the source,
c_utf = utf8_pos(vc, s);
if (ch == 0xff)
src = fontdata + (c_utf * cellsize_utf * 2);
else
src = fontdata + (c_utf * cellsize_utf * 2 + cellsize_utf);
Fixes 258dc83 ("fbdev: Add bounds checking in bit_putcs to fix vmalloc-out-of-bounds")
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent dc20ca4 commit b067537
1 file changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
0 commit comments