Closed
Bug 1486386
Opened 6 years ago
Closed 3 years ago
cairo-type1-subset.c uses isxdigit()
Categories
(Core :: Graphics, defect, P3)
Tracking
()
RESOLVED
FIXED
92 Branch
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: hsivonen, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
cairo-type1-subset.c uses isxdigit(). This has 2 bugs: 1) On platforms where char is signed, calling isxdigit() with a char argument is UB when the most-significant bit of the char is set. 2) According to MSDN, isxdigit() is locale-sensitive. According to glibc sources, isxdigit() does a lookup from locale-dependent tables, but I didn't check if the that part of the tables actually varies by locale. Instead of using isxdigit(), Cairo should have a function that does ('0' <= c && c <= '9') || ('A' <= c && c <= 'f') || ('A' <= c && c <= 'F')
Reporter | ||
Comment 1•6 years ago
|
||
Upstream issue: https://gitlab.freedesktop.org/cairo/cairo/issues/335
Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #0) > Instead of using isxdigit(), Cairo should have a function that does > ('0' <= c && c <= '9') || ('A' <= c && c <= 'f') || ('A' <= c && c <= 'F') 'a' instead of 'A' the first time.
Updated•6 years ago
|
OS: Unspecified → Linux
Priority: -- → P3
Whiteboard: [gfx-noted]
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae62445f52a2 Cherry-pick cairo commit 30a0ae56d8eaf7735d6f4a8a889e9c54bc0debc1 to fix isxdigit issue. r=jrmuizel
Comment 5•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox92:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•