This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] scanf interceptor: fix write size for %mc/%mC/%mS
ClosedPublic

Authored by MaskRay on Aug 21 2023, 9:38 PM.

Details

Summary

When the optional assignment-allocation character 'm' (Extension to the
ISO C standard) is present, we currently use internal_strlen(buf)+1 for
all of cCsS[ (D85350). Fix cCS to use the correct size.

Fix https://github.com/llvm/llvm-project/issues/61768

Diff Detail

Event Timeline

MaskRay created this revision.Aug 21 2023, 9:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 9:38 PM
Herald added a subscriber: Enna1. · View Herald Transcript
MaskRay requested review of this revision.Aug 21 2023, 9:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 9:38 PM
MaskRay updated this revision to Diff 552212.Aug 21 2023, 9:46 PM
MaskRay edited the summary of this revision. (Show Details)

Fix %m[

MaskRay edited the summary of this revision. (Show Details)Aug 21 2023, 9:49 PM
vitalybuka accepted this revision.Aug 27 2023, 10:05 PM
This revision is now accepted and ready to land.Aug 27 2023, 10:05 PM
This revision was landed with ongoing or failed builds.Aug 27 2023, 10:19 PM
This revision was automatically updated to reflect the committed changes.