Skip to content

Commit 34c821f

Browse files
committed
PS: Drive-by fix.
1 parent 3c38133 commit 34c821f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

powershell/ql/lib/semmle/code/powershell/dataflow/internal/DataFlowPrivate.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ predicate readStep(Node node1, ContentSet c, Node node2) {
749749
exists(CfgNode cfgNode |
750750
node1 = TPreReturnNodeImpl(cfgNode, true) and
751751
node2 = TImplicitWrapNode(cfgNode, true) and
752-
c.isSingleton(any(Content::KnownElementContent ec))
752+
c.isSingleton(any(Content::KnownElementContent ec | exists(ec.getIndex().asInt())))
753753
)
754754
or
755755
c.isAnyElement() and
@@ -785,7 +785,7 @@ predicate clearsContent(Node n, ContentSet c) {
785785
*/
786786
predicate expectsContent(Node n, ContentSet c) {
787787
n = TPreReturnNodeImpl(_, true) and
788-
c.isKnownOrUnknownElement(_)
788+
c.isKnownOrUnknownElement(any(Content::KnownElementContent ec | exists(ec.getIndex().asInt())))
789789
or
790790
n = TImplicitWrapNode(_, false) and
791791
c.isSingleton(any(Content::UnknownElementContent ec))

0 commit comments

Comments
 (0)