Skip to content

Commit 3588066

Browse files
committed
Java: Add qldoc and change note.
1 parent a583f00 commit 3588066

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

change-notes/1.22/analysis-java.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88

99
## Changes to QL libraries
1010

11+
* The virtual dispatch library has been updated to give more precise dispatch
12+
targets for `Object.toString()` calls. This affects all security queries and
13+
removes false positives that arose from paths through impossible `toString()`
14+
calls.
15+

java/ql/src/semmle/code/java/dispatch/ObjFlow.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* Provides a dispatch relation `viableImpl_out` that reduces the set of
3+
* dispatch targets for `Object.toString()` calls relative to the input
4+
* dispatch relation `viableImpl_inp`.
5+
*
6+
* The set of dispatch targets for `Object.toString()` calls are reduced based
7+
* on possible data flow from objects of more specific types to the qualifier.
8+
*/
19
import java
210
private import VirtualDispatch
311
private import semmle.code.java.controlflow.Guards
@@ -251,7 +259,7 @@ private Method viableImplObjectToString(MethodAccess ma) {
251259
* Gets a viable dispatch target for `ma`. This is the output dispatch relation.
252260
*
253261
* The set of dispatch targets for `Object.toString()` calls are reduced based
254-
* on possibly data flow from objects of more specific types to the qualifier.
262+
* on possible data flow from objects of more specific types to the qualifier.
255263
*/
256264
Method viableImpl_out(MethodAccess ma) {
257265
result = viableImpl_inp(ma) and

0 commit comments

Comments
 (0)