From 413f1945ce6e014ea7fa0ffe216046f0f6abff8b Mon Sep 17 00:00:00 2001 From: Ahmed Farid <53880570+ahmed-farid-dev@users.noreply.github.com> Date: Mon, 28 Mar 2022 00:44:56 +0000 Subject: [PATCH] Update Zip.qll --- .../experimental/semmle/python/frameworks/Zip.qll | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Zip.qll b/python/ql/src/experimental/semmle/python/frameworks/Zip.qll index b730acd4eeb..fa78e75b3ad 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Zip.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Zip.qll @@ -13,17 +13,20 @@ private module Zip { } override DataFlow::Node getAPathArgument() { - result in [this.getArg(0), this.getArgByName("src"), this.getArg(1), this.getArgByName("dst")] + result in [this.getArg(0), this.getArgByName("src")] } + + override DataFlow::Node getfsrcArgument() { none() } } private class CopyFileobj extends DataFlow::CallCfgNode, CopyFile::Range { CopyFileobj() { this = API::moduleImport("shutil").getMember("copyfileobj").getACall() } - override DataFlow::Node getAPathArgument() { - result in [ - this.getArg(0), this.getArgByName("fsrc"), this.getArg(1), this.getArgByName("fdst") - ] + override DataFlow::Node getfsrcArgument() { + result in [this.getArg(0), this.getArgByName("fsrc")] } + + override DataFlow::Node getAPathArgument() { none() } } } +