Page MenuHomePhabricator

[Sanitizer] Fix a possible write to freed memory in the wcrtomb interceptor
ClosedPublic

Authored by labath on Mar 29 2019, 2:56 AM.

Details

Summary

r357240 added an interceptor for wctomb, which uses a temporary local
buffer to make sure we don't write to unallocated memory. This patch
applies the same technique to wcrtomb, and adds some additional tests
for this function.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Mar 29 2019, 2:56 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 29 2019, 2:56 AM
vitalybuka accepted this revision.Apr 5 2019, 5:47 PM
This revision is now accepted and ready to land.Apr 5 2019, 5:47 PM
This revision was automatically updated to reflect the committed changes.