From 96e220588ebcf07635df88692f09f7746892087d Mon Sep 17 00:00:00 2001 From: ihsinme Date: Sun, 31 Jul 2022 13:44:50 +0300 Subject: [PATCH] Update DangerousUseMbtowc.ql --- .../src/experimental/Security/CWE/CWE-125/DangerousUseMbtowc.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousUseMbtowc.ql b/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousUseMbtowc.ql index 6c0bf84e81b..0b87d920b6f 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousUseMbtowc.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousUseMbtowc.ql @@ -117,7 +117,7 @@ predicate findUseCharacterConversion(Expr exp, string msg) { predicate findUseMultibyteCharacter(Expr exp, string msg) { exists(ArrayType arrayType, ArrayExpr arrayExpr | arrayExpr = exp and - arrayExpr.getArrayBase().(VariableAccess).getTarget().getADeclarationEntry().getType() = + arrayExpr.getArrayBase().getType() = arrayType and ( exists(AssignExpr assZero, SizeofExprOperator sizeofArray, Expr oneValue |