[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] gsoc-anurag-2022 08e08f590: Fix monochrome crash
From: |
Werner Lemberg |
Subject: |
[freetype2] gsoc-anurag-2022 08e08f590: Fix monochrome crash |
Date: |
Tue, 18 Oct 2022 16:48:29 -0400 (EDT) |
branch: gsoc-anurag-2022
commit 08e08f590807a4bc99b5cd1257c8aeace1ca9538
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 08e08f590: Fix monochrome crash,
Werner Lemberg <=