Resolves this bug:
https://bugs.llvm.org/show_bug.cgi?id=38369
Differential D78490
[dfsan] Fix a bug in strcasecmp() and strncasecmp(): Compare the lowercase versions of the characters when choosing a return value. skerner on Apr 20 2020, 6:45 AM. Authored by
Details Resolves this bug: https://bugs.llvm.org/show_bug.cgi?id=38369
Diff Detail
Event TimelineComment Actions Address review comments.
Comment Actions
Done. PTAL. |
IIUC, this test would still pass with the buggy code. I think the case we want is:
Since 'y' - 'Z' > 0 but 'y' - 'z' < 0.