Fixes: PR28520
Perform a bounds check on a function's argument list, before accessing any index value specified by an 'argument_with_type_tag' attribute.
Paths
| Differential D40574
Bounds check argument_with_type_tag attribute. ClosedPublic Authored by mattd on Nov 28 2017, 12:44 PM.
Details
Summary Fixes: PR28520 Perform a bounds check on a function's argument list, before accessing any index value specified by an 'argument_with_type_tag' attribute.
Diff Detail Event Timeline
Comment Actions
mattd added inline comments.
This revision is now accepted and ready to land.Nov 29 2017, 1:23 PM Comment Actions Thanks for the approval Aaron. I do not have commit access, would you mind submitting this on my behalf? Comment Actions
Happy to do so -- I've commit in r319383, thank you for the patch!
Revision Contents
Diff 124606 include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaChecking.cpp
test/Sema/error-type-safety.cpp
|
These should be combined into a single diagnostic: %select{type|argument}0 tag index %1 is greater than the number of arguments specified