[cfe-commits] [PATCH] strnlen checker

Lenny Maiorani lenny at Colorado.EDU
Mon Feb 7 12:06:57 PST 2011


The attached patch is available for review/inclusion.


This patch adds support for checking strnlen() in the Static Analyzer by extending and common-izing the strlen() checker. 

The checker first computes the length of the string, then compares that to the value of the maxlen arg. If the maxlen is less than the length of the string the maxlen value becomes the bind value instead of the length of the string.

-Lenny

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



       __o
     _`\<,_
    (*)/ (*)
~~~~~~~~~~~~~~~~~~~~



More information about the cfe-commits mailing list