Do not warn about format strings that are indexed string literals.
Summary: The warning for a format string not being a string literal and therefore being potentially insecure is overly strict for indices into string literals. This fix checks if the index into the string literal is precomputable. If that's the case it will check if the suffix of that string literal is a valid format string string literal. It will still issue the aforementioned warning for out of range indices into the string literal. Patch by Meike Baumgärtner (meikeb) Reviewers: rsmith Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D24584 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281686 91177308-0d34-0410-b5e6-96231b3b80d8
Loading
Please register or sign in to comment