[LLVMbugs] [Bug 2965] Bogus format string warning

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Nov 13 06:55:24 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=2965

Douglas Gregor <dgregor at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dgregor at apple.com
         Resolution|                            |WONTFIX

--- Comment #7 from Douglas Gregor <dgregor at apple.com> 2010-11-13 08:55:23 CST ---
This is correct behavior. The global variable

  static const char *zFormat1 = "%4d %-13s %4d %4d %4d %-4s %.2X %s\n";

can be reassigned, which is a potential security problem. As noted in the
comments, add 'const' and the security problem (along with the warning) goes
away.

-- 
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.



More information about the llvm-bugs mailing list