Skip to content

Commit 54e9c49

Browse files
Remove SendBroadcastMethodAccess
1 parent e02be6c commit 54e9c49

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

java/ql/lib/semmle/code/java/security/AndroidSensitiveBroadcastQuery.qll

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ private class SensitiveInfoExpr extends Expr {
2020
}
2121
}
2222

23-
/**
24-
* A method access of the `Context.sendBroadcast` family.
25-
*/
26-
private class SendBroadcastMethodAccess extends MethodAccess {
27-
SendBroadcastMethodAccess() {
28-
this.getMethod().getDeclaringType().getASourceSupertype*() instanceof TypeContext and
29-
this.getMethod().getName().matches("send%Broadcast%")
30-
}
31-
}
32-
3323
private predicate maybeNullArg(Expr ex) {
3424
exists(DataFlow::Node src, DataFlow::Node sink, MethodAccess ma |
3525
ex = ma.getAnArgument() and
@@ -54,7 +44,8 @@ private predicate maybeEmptyArrayArg(Expr ex) {
5444
* Holds if a `sendBroadcast` call doesn't specify receiver permission.
5545
*/
5646
private predicate isSensitiveBroadcastSink(DataFlow::Node sendBroadcastCallArg) {
57-
exists(SendBroadcastMethodAccess ma, string name | ma.getMethod().hasName(name) |
47+
exists(MethodAccess ma, string name | ma.getMethod().hasName(name) |
48+
ma.getMethod().getDeclaringType().getASourceSupertype*() instanceof TypeContext and
5849
sendBroadcastCallArg.asExpr() = ma.getAnArgument() and
5950
(
6051
name = "sendBroadcast" and

0 commit comments

Comments
 (0)