Summary: | Uninitialized variable in HtmlFont.cc causes segfault | ||
---|---|---|---|
Product: | poppler | Reporter: | Tomas Are Haavet <tomasare> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Tomas Are Haavet
2008-09-20 05:21:05 UTC
Patch looks wrong, i'd say the equal needs to be outside the if (!DefaultFont) { Do you agree? Absolutely, sorry about that. You're thinking of something like this instead? We only need to assign pos if the fontname variable is NULL. diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc index 3598e7f..ed8656c 100644 --- a/utils/HtmlFonts.cc +++ b/utils/HtmlFonts.cc @@ -131,7 +131,8 @@ HtmlFont::HtmlFont(GooString* ftname,int _size, GfxRGB rgb){ } pos=i; delete fontname; - } + } else + pos = font_num; if (!DefaultFont) DefaultFont=new GooString(fonts[font_num].name); } Fix commited for poppler 0.9.2 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.