[PATCH] D66049: [analyzer] PR41729: Fix some false positives and improve strlcat and strlcpy modeling

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 07:16:04 PDT 2019


Szelethus accepted this revision.
Szelethus added a comment.
This revision is now accepted and ready to land.

LGTM!

In D66049#1701730 <https://reviews.llvm.org/D66049#1701730>, @dkrupp wrote:

> I also analyzed openssl with the baseline and this version, but did not find any new warnings.
> See:
>  http://codechecker-demo.eastus.cloudapp.azure.com/Default/#run=D66049_baseline&newcheck=D66049_improved&review-status=Unreviewed&review-status=Confirmed&detection-status=New&detection-status=Reopened&detection-status=Unresolved&tab=D66049_baseline_diff_D66049_improved


This requires a username/pw, but if there isn't any noticeable change on open source code, this change mustn't hurt much.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1652-1654
+        if (TrueState && !FalseState) {
+          amountCopied = strLength;
+        }
----------------
We usually omit braces when the branch consists of a single line.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66049/new/

https://reviews.llvm.org/D66049





More information about the cfe-commits mailing list