Skip to content

Commit a374953

Browse files
committed
The query should only report cases when the method is not empty.
1 parent ee08e8b commit a374953

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/src/Security/CWE/CWE-925/ImproperIntentVerification.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ import java
1414
import semmle.code.java.security.ImproperIntentVerificationQuery
1515

1616
from AndroidReceiverXmlElement reg, Method orm, SystemActionName sa
17-
where unverifiedSystemReceiver(reg, orm, sa)
17+
where unverifiedSystemReceiver(reg, orm, sa) and orm.getBody().getBlock().getNumStmt() > 0
1818
select orm, "This reciever doesn't verify intents it receives, and $@ to receive $@.", reg,
1919
"it is registered", sa, "the system action " + sa.getName()

0 commit comments

Comments
 (0)