================
@@ -2106,6 +2108,10 @@ class UnsafeLibcFunctionCallGadget : public 
WarningGadget {
     // function that is not in any namespace:
     if (!FD->isInStdNamespace() && !IsGlobalAndNotInAnyNamespace)
       return false;
+    // If the call has a sole null-terminated argument, e.g., strlen,
+    //  printf, atoi, we consider it safe:
+    if (CE->getNumArgs() == 1 && isNullTermPointer(CE->getArg(0), Ctx))
----------------
ziqingluo-90 wrote:

This is from downstream. It helped discovering the bug first.

https://github.com/llvm/llvm-project/pull/172091
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to