[LLVMbugs] [Bug 12807] unix.cstring.NullArg: strncpy: greater than destination buffer
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 14 11:00:44 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12807
Jordy Rose <jediknil at belkadan.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jediknil at belkadan.com
Resolution| |FIXED
--- Comment #1 from Jordy Rose <jediknil at belkadan.com> 2012-05-14 13:00:44 CDT ---
The strncpy code path was bounds-checking on the last element accessed
(&dst[n-1]), but if n is 0, we get a size_t wraparound. Fixed with an explicit
check for 0 in r156769.
--
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