Skip to content

Commit

Permalink
fix: missing remainingBytes check causes endless loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
434b committed Aug 17, 2023
1 parent 830f2c8 commit 87d5a89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/typescript/fuzz_scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports.fuzz = function(data) {
scanner.getTokenStart();
scanner.getTokenEnd();

if (provider.consumeProbabilityFloat() < 0.1) {
if (provider.remainingBytes > 0 && provider.consumeProbabilityFloat() < 0.1) {
scanner.resetTokenState(provider.consumeIntegralInRange(0, text.length));
}

Expand Down

0 comments on commit 87d5a89

Please sign in to comment.