Merge pull request #13899 from egregius313/egregius313/random-nextbytes-typo-fix

Java: Fix typo in `StdlibRandomSource::getOutput`
This commit is contained in:
Edward Minnix III
2023-08-07 07:36:44 -04:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* 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.

View File

@@ -103,7 +103,7 @@ class StdlibRandomSource extends RandomDataSource {
}
override Expr getOutput() {
if m.hasName("getBytes") then result = this.getArgument(0) else result = this
if m.hasName("nextBytes") then result = this.getArgument(0) else result = this
}
}