[PATCH 1/3] sfnt2fon: Avoid out-of-bounds read (AddressSanitizer).
Anton Baskanov
baskanov at gmail.com
Sun Aug 29 09:06:23 CDT 2021
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45422
Signed-off-by: Anton Baskanov <baskanov at gmail.com>
---
tools/sfnt2fon/sfnt2fon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/sfnt2fon/sfnt2fon.c b/tools/sfnt2fon/sfnt2fon.c
index 0d59bfc1db2..6427eb9f840 100644
--- a/tools/sfnt2fon/sfnt2fon.c
+++ b/tools/sfnt2fon/sfnt2fon.c
@@ -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(y = 0; y < ppem; y++) {
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;
continue;
}
--
2.25.1
More information about the wine-devel
mailing list