sfnt2fon: Avoid out-of-bounds read (AddressSanitizer).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45422 Signed-off-by: Anton Baskanov <baskanov@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3a54b3413d
commit
2e26090838
|
@ -743,7 +743,7 @@ static struct fontinfo *fill_fontinfo( const char *face_name, int ppem, int enc,
|
||||||
for(x = 0; x < ((info->dfCharTable[i].width + 7) / 8); x++) {
|
for(x = 0; x < ((info->dfCharTable[i].width + 7) / 8); x++) {
|
||||||
for(y = 0; y < ppem; y++) {
|
for(y = 0; y < ppem; y++) {
|
||||||
if(y < ascent - face->glyph->bitmap_top ||
|
if(y < ascent - face->glyph->bitmap_top ||
|
||||||
y >= face->glyph->bitmap.rows + ascent - face->glyph->bitmap_top) {
|
y >= (int)face->glyph->bitmap.rows + ascent - face->glyph->bitmap_top) {
|
||||||
info->data[data_pos++] = 0;
|
info->data[data_pos++] = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue