From 886a79f1f7573aff476e7053637292c46f3c1471 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Thu, 20 Aug 2009 20:57:02 +0200 Subject: [PATCH] fixed segfault in new space detection code --- lib/pdf/InfoOutputDev.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pdf/InfoOutputDev.cc b/lib/pdf/InfoOutputDev.cc index affad69..fd9bf99 100644 --- a/lib/pdf/InfoOutputDev.cc +++ b/lib/pdf/InfoOutputDev.cc @@ -106,7 +106,7 @@ static int findSpace(gfxfont_t*font) first_space = t; } } - if(GLYPH_IS_SPACE(&font->glyphs[32])) { + if(font->num_glyphs>32 && GLYPH_IS_SPACE(&font->glyphs[32])) { return 32; } return first_space; -- 1.7.10.4