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

Attachment: strncpy-checker.diff
Description: Binary data




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

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to