Skip to content

Commit 1aa4494

Browse files
committed
stash
1 parent fabde6e commit 1aa4494

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

go/ql/src/experimental/frameworks/DecompressionBombs.qll

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,19 +605,31 @@ module DecompressionBombs {
605605
none()
606606
}
607607
}
608+
609+
class TheSink extends Sink {
610+
TheSink() {
611+
exists(Method m |
612+
m.hasQualifiedName("github.com/klauspost/compress/s2", "Reader",
613+
["DecodeConcurrent", "ReadByte", "Read"])
614+
|
615+
this = m.getACall().getReceiver()
616+
)
617+
}
618+
}
608619
}
609620

610621
/**
611622
* Provides Decompression Sinks and additional taint steps for `github.com/klauspost/compress/s2` package
612623
*/
613624
module KlauspostS2 {
614-
class TheSink extends Sink {
625+
class TheSink extends DataFlow::Node {
615626
TheSink() {
616627
exists(Method m |
617-
m.hasQualifiedName("github.com/klauspost/compress/s2", "Reader",
618-
["DecodeConcurrent", "ReadByte", "Read"])
628+
m.getType()
629+
.getUnderlyingType()
630+
.hasQualifiedName("github.com/klauspost/compress/s2", "Reader")
619631
|
620-
this = m.getACall().getReceiver()
632+
this = m.getACall()
621633
)
622634
}
623635
}

0 commit comments

Comments
 (0)