From e0e978bd3effe96e477431522b928e9a0619f683 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Wed, 16 Nov 2022 16:22:39 +0100 Subject: [PATCH] Python: Fix ql4ql alerts --- .../semmle/python/dataflow/new/internal/DataFlowPrivate.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll index 2b2b22ed3ce..cac72c97e9a 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll @@ -708,8 +708,8 @@ predicate dictStoreStep(CfgNode nodeFrom, DictionaryElementContent c, Node nodeT or // see https://docs.python.org/3.10/library/stdtypes.html#dict.setdefault exists(MethodCallNode call | - call.calls(nodeTo.(PostUpdateNode).getPreUpdateNode(), ["setdefault"]) and - call.getArg(0).asExpr().(StrConst).getText() = c.(DictionaryElementContent).getKey() and + call.calls(nodeTo.(PostUpdateNode).getPreUpdateNode(), "setdefault") and + call.getArg(0).asExpr().(StrConst).getText() = c.getKey() and nodeFrom = call.getArg(1) ) }