URL parsing uses isdigit() and isxdigit()

RESOLVED FIXED in Firefox 63

Status

()

defect
P3
normal
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: hsivonen, Assigned: hsivonen)

Tracking

(Blocks 1 bug)

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 attachment)

Per https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l these are locale-dependent on Windows and https://stackoverflow.com/questions/2898228/can-isdigit-legitimately-be-locale-dependent-in-c gives an example of how.

mozilla::IsAsciiDigit() should be used in place of isdigit() and an analog of isxdigit() needs to be introduced in mfbt/TextUtils.h.
mozilla::IsAsciiHexDigit() is coming in bug 1421501.
Depends on: 1421501
Priority: -- → P3
Whiteboard: [necko-triaged]
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Comment on attachment 9004140 [details]
Bug 1485340 - Avoid isdigit() and isxdigit() in URL parsing.

Valentin Gosu [:valentin] has approved the revision.
Attachment #9004140 - Flags: review+
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be9a86909487
Avoid isdigit() and isxdigit() in URL parsing. r=valentin
https://hg.mozilla.org/mozilla-central/rev/be9a86909487
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.