mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Solve problems with missing TTupleElementContent
Ruby uses 10 as their number. I considered doing the same, but didn't
really care _too_ much about it 🤷
14cfb82a8c/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll (L636)
This commit is contained in:
@@ -588,6 +588,11 @@ newtype TContent =
|
||||
or
|
||||
// Arguments can overflow and end up in the starred parameter tuple.
|
||||
exists(any(CallNode cn).getArg(index))
|
||||
or
|
||||
// since flow summaries might use tuples, we ensure that we at least have valid
|
||||
// TTupleElementContent for the 0..7 (7 was picked to match `small_tuple` in
|
||||
// data-flow-private)
|
||||
index in [0 .. 7]
|
||||
} or
|
||||
/** An element of a dictionary under a specific key. */
|
||||
TDictionaryElementContent(string key) {
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
| compiled re.subn | ReturnValue.TupleElement[0] | TupleElement[0] |
|
||||
| re.subn | ReturnValue.TupleElement[0] | TupleElement[0] |
|
||||
|
||||
Reference in New Issue
Block a user