[cfe-commits] strncpy checker

Leonard Maiorani lenny at Colorado.EDU
Wed Dec 15 08:51:38 PST 2010


Attached is my first foray into Clang Static Analyzer contributions. Please review for style and correctness. Take punches at it if you will, I am tough enough. Unit tests are included.

strncpy() was not being checked at all, so this should solve that problem by ensuring that the 'n' parameter to strncpy() is not larger than the size of the buffer passed in because that would indicate a logic error and potential bus error.

-Lenny

-------------- next part --------------
A non-text attachment was scrubbed...
Name: strncpy-checker.diff
Type: application/octet-stream
Size: 8098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101215/a8d3c110/attachment.obj>
-------------- next part --------------




the definition of open: "mkdir android ; cd android ; repo init -i git://android.git.kernel.org/platform/manifest.git ; repo sync ; make" - Andy Rubin



More information about the cfe-commits mailing list