[gs-bugs] [Bug 689984] New: xps_strcasecmp() causes issues when expected to behave like strcasecmp()

bugs.ghostscript.com-bugzilla-daemon at ghostscript.com bugs.ghostscript.com-bugzilla-daemon at ghostscript.com
Mon Jul 28 21:49:47 PDT 2008


http://bugs.ghostscript.com/show_bug.cgi?id=689984

           Summary: xps_strcasecmp() causes issues when expected to behave
                    like strcasecmp()
           Product: GhostXPS
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P4
         Component: General
        AssignedTo: tor.andersson at artifex.com
        ReportedBy: dgeering at toshiba-tap.com
         QAContact: gs-bugs at ghostscript.com


In xpszip.c there is an error in xps_find_part() (line 160).

xps_find_part() uses a function xps_strcasecmp(), but xps_strcasecmp() will
always return zero (a match) if the first string is shorter than the second
string, which means that a lot of matches will be incorrect if xps_strcasecmp()
is expected to behave as strcasecmp() would.

I'm not sure about all events that would trigger this, but in my particular case
it was not deobfuscating fonts. The xps_new_glyph() function was calling
xps_find_part(), but xps_find_part() was always returning the first "part" of
the context because the first part's name was shorter than font part's name. By
changing "xps_strcasecmp()" to "strcasecmp()" in xpszip.c:xps_find_part(),
obfuscated fonts become deobfuscated and loaded correctly.



------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the gs-bugs mailing list