Skip to content

Commit 58d8a2d

Browse files
authored
Merge pull request github#13899 from egregius313/egregius313/random-nextbytes-typo-fix
Java: Fix typo in `StdlibRandomSource::getOutput`
2 parents 2126ab0 + 23e2eb1 commit 58d8a2d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Fixed a typo in the `StdlibRandomSource` class in `RandomDataSource.qll`, which caused the class to improperly model calls to the `nextBytes` method. Queries relying on `StdlibRandomSource` may see an increase in results.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class StdlibRandomSource extends RandomDataSource {
103103
}
104104

105105
override Expr getOutput() {
106-
if m.hasName("getBytes") then result = this.getArgument(0) else result = this
106+
if m.hasName("nextBytes") then result = this.getArgument(0) else result = this
107107
}
108108
}
109109

0 commit comments

Comments
 (0)