Closed
Bug 1486385
Opened 7 years ago
Closed 2 years ago
SkPDFConvertType1FontStream.cpp uses isxdigit()
Categories
(Core :: Graphics, defect, P3)
Core
Graphics
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: hsivonen, Unassigned)
References
Details
(Whiteboard: [gfx-noted])
SkPDFConvertType1FontStream.cpp 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(), Skia should have a function that does
('0' <= c && c <= '9') || ('A' <= c && c <= 'f') || ('A' <= c && c <= 'F')
| Reporter | ||
Comment 1•7 years ago
|
||
Filed upstream issue:
https://bugs.chromium.org/p/skia/issues/detail?id=8285
| Reporter | ||
Comment 2•7 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #0)
> ('0' <= c && c <= '9') || ('A' <= c && c <= 'f') || ('A' <= c && c <= 'F')
'a' instead of 'A' the first time.
Comment 3•7 years ago
|
||
Lee, I assume this will be picked up by a future skia update?
Priority: -- → P3
Whiteboard: [gfx-noted]
Updated•3 years ago
|
Severity: normal → S3
Comment 4•2 years ago
|
||
This bug has been patched in upstream and merged here. This bug should be closed.
Updated•2 years ago
|
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•