http://llvm.org/bugs/show_bug.cgi?id=11141
Summary: Provide a fixit hint for non-const format string with
no other parameters.
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
A relatively common pattern is
char *foo;
…
printf(foo);
clang warns about this because it's a potential security problem if foo is
user-controlled.
That warning should provide a fixit to add "%s".
printf("%s", foo);
The tricky part is to get this right for all flavors of format string functions
(e.g. NSLog(@"%@", nsstring);)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs