From 201c4aad13c529884bdeb3bef7d89e6968055b44 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 4 Oct 2024 14:09:33 +0200 Subject: [PATCH] Python: add comment --- .../semmle/python/dataflow/new/internal/DataFlowDispatch.qll | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll index 88a6ed903146..5e987eadc275 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll @@ -368,6 +368,9 @@ abstract class DataFlowFunction extends DataFlowCallable, TFunction { int positionalOffset() { result = 0 } override ParameterNode getParameter(ParameterPosition ppos) { + // Do not handle lower bound positions (such as `[1..]`) here + // they are handled by parameter matching and would create + // inconsistencies here as multiple parameters could match such a position. exists(int index | ppos.isPositional(index) | result.getParameter() = func.getArg(index + this.positionalOffset()) )