Skip to content

Commit 99bc264

Browse files
committed
fix: check for negative values when parsing JAZZER_MAXIMIZE_MAX_COUNTERS
1 parent 789e759 commit 99bc264

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/code_intelligence/jazzer/runtime/CountersTracker.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,11 @@ private static int initMaxCounters() {
261261
return DEFAULT_MAX_COUNTERS;
262262
}
263263
try {
264-
return Integer.parseInt(value.trim());
264+
int parsed = Integer.parseInt(value.trim());
265+
if (parsed <= 0) {
266+
return DEFAULT_MAX_COUNTERS;
267+
}
268+
return parsed;
265269
} catch (NumberFormatException e) {
266270
return DEFAULT_MAX_COUNTERS;
267271
}

0 commit comments

Comments
 (0)