@@ -451,7 +451,11 @@ private predicate hasWithContentSummary(
451
451
* Holds if the given component can't be evaluated by `evaluateSummaryComponentStackLocal`.
452
452
*/
453
453
pragma [ nomagic]
454
- predicate isNonLocal ( SummaryComponent component ) { component = SC:: content ( _) }
454
+ predicate isNonLocal ( SummaryComponent component ) {
455
+ component = SC:: content ( _)
456
+ or
457
+ component = SC:: withContent ( _)
458
+ }
455
459
456
460
/**
457
461
* Gets a data flow node corresponding an argument or return value of `call`,
@@ -495,6 +499,14 @@ private predicate dependsOnSummaryComponentStackCons(
495
499
dependsOnSummaryComponentStack ( callable , SCS:: push ( head , tail ) )
496
500
}
497
501
502
+ pragma [ nomagic]
503
+ private predicate dependsOnSummaryComponentStackConsLocal (
504
+ SummarizedCallable callable , SummaryComponent head , SummaryComponentStack tail
505
+ ) {
506
+ dependsOnSummaryComponentStackCons ( callable , head , tail ) and
507
+ not isNonLocal ( head )
508
+ }
509
+
498
510
pragma [ nomagic]
499
511
private predicate dependsOnSummaryComponentStackLeaf (
500
512
SummarizedCallable callable , SummaryComponent leaf
@@ -515,7 +527,7 @@ private DataFlow::Node evaluateSummaryComponentStackLocal(
515
527
or
516
528
exists ( DataFlow:: Node prev , SummaryComponent head , SummaryComponentStack tail |
517
529
prev = evaluateSummaryComponentStackLocal ( callable , call , tail ) and
518
- dependsOnSummaryComponentStackCons ( callable , pragma [ only_bind_into ] ( head ) ,
530
+ dependsOnSummaryComponentStackConsLocal ( callable , pragma [ only_bind_into ] ( head ) ,
519
531
pragma [ only_bind_out ] ( tail ) ) and
520
532
stack = SCS:: push ( pragma [ only_bind_out ] ( head ) , pragma [ only_bind_out ] ( tail ) )
521
533
|
0 commit comments