Closed Bug 1485342 Opened Last year Closed Last year

URL classifier uses isdigit() and isxdigit()

Categories

(Toolkit :: Safe Browsing, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.
Priority: -- → P3
mozilla::IsAsciiHexDigit() is coming in bug 1421501.
Depends on: 1421501
MozReview-Commit-ID: IvadP10PFEZ
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Comment on attachment 9004147 [details]
Bug 1485342 - Avoid isdigit() and isxdigit() in URL classifier.

François Marier [:francois] has approved the revision.
Attachment #9004147 - Flags: review+
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6f25c83bb4d5
Avoid isdigit() and isxdigit() in URL classifier. r=francois
https://hg.mozilla.org/mozilla-central/rev/6f25c83bb4d5
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.