[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] gsoc-anurag-2022-final fd4757d4e 32/32: Fix monochrome crash
From: |
Werner Lemberg |
Subject: |
[freetype2] gsoc-anurag-2022-final fd4757d4e 32/32: Fix monochrome crash |
Date: |
Sun, 13 Nov 2022 23:49:28 -0500 (EST) |
branch: gsoc-anurag-2022-final
commit fd4757d4e42fc1f7ab61b53d1a3abf3a6a61f619
Author: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
Commit: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
Fix monochrome crash
---
src/dense/ftdenserend.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/dense/ftdenserend.c b/src/dense/ftdenserend.c
index cd2aeeb4c..903527bff 100644
--- a/src/dense/ftdenserend.c
+++ b/src/dense/ftdenserend.c
@@ -75,6 +75,15 @@ take a variable named `memory`. It can only be known if you
follow the macros 3
goto Exit;
}
+ /* check mode */
+ if ( mode != FT_RENDER_MODE_NORMAL &&
+ mode != FT_RENDER_MODE_LIGHT &&
+ mode != FT_RENDER_MODE_LCD &&
+ mode != FT_RENDER_MODE_LCD_V )
+ {
+ error = FT_THROW( Cannot_Render_Glyph );
+ goto Exit;
+ }
/* deallocate the previously allocated bitmap */
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] gsoc-anurag-2022-final fd4757d4e 32/32: Fix monochrome crash,
Werner Lemberg <=