[PATCH] omGeneric: Fix NULL pointer dereferences in set_fontset_extents
Ismael Luceno
ismael at iodev.co.uk
Tue Jul 14 21:36:28 PDT 2015
Signed-off-by: Ismael Luceno <ismael at iodev.co.uk>
---
modules/om/generic/omGeneric.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/om/generic/omGeneric.c b/modules/om/generic/omGeneric.c
index a835f00..f0861e8 100644
--- a/modules/om/generic/omGeneric.c
+++ b/modules/om/generic/omGeneric.c
@@ -398,7 +398,7 @@ set_fontset_extents(
font_data = font_set->vmap;
font_data_count = font_set->vmap_num;
for( ; font_data_count-- ; font_data++) {
- if(font_data->font != NULL) {
+ if(font_data && font_data->font) {
check_fontset_extents(&overall, &logical_ascent,
&logical_descent,
font_data->font);
@@ -410,7 +410,7 @@ set_fontset_extents(
font_data = (FontData) font_set->vrotate;
font_data_count = font_set->vrotate_num;
for( ; font_data_count-- ; font_data++) {
- if(font_data->font != NULL) {
+ if(font_data && font_data->font) {
check_fontset_extents(&overall, &logical_ascent,
&logical_descent,
font_data->font);
--
2.4.5
More information about the xorg-devel
mailing list