From 4883aa7ae64b6b79c030ff5b15a9bf1329f8a18a Mon Sep 17 00:00:00 2001 From: simonevallifuoco <73176205+simonevallifuoco@users.noreply.github.com> Date: Sun, 11 Jun 2023 11:17:05 +0200 Subject: [PATCH] Update function-use-after-free.yaml changed pattern-not-inside: $VAR = NULL; ... to pattern-not-inside: free($VAR); ... $VAR = NULL; ... since it missed to find the cases when $VAR = NULL; is done before free($VAR) --- c/lang/security/function-use-after-free.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/c/lang/security/function-use-after-free.yaml b/c/lang/security/function-use-after-free.yaml index 035fe9b359..e91cc0c85f 100644 --- a/c/lang/security/function-use-after-free.yaml +++ b/c/lang/security/function-use-after-free.yaml @@ -13,6 +13,8 @@ rules: free($VAR); ... - pattern-not-inside: + free($VAR); + ... $VAR = NULL; ... - pattern-not-inside: