Skip to content

Commit 0216f92

Browse files
Update src/test/java/org/xerial/snappy/fuzz/SnappyStreamFuzzer.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent f0f429f commit 0216f92

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/test/java/org/xerial/snappy/fuzz/SnappyStreamFuzzer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public static void fuzzerTestOneInput(FuzzedDataProvider data) {
4444
try (SnappyInputStream snappyIn = new SnappyInputStream(new ByteArrayInputStream(compressed))) {
4545
ByteArrayOutputStream out = new ByteArrayOutputStream();
4646
byte[] buf = new byte[4096];
47-
for (int readBytes = 0; (readBytes = snappyIn.read(buf)) != -1; ) {
47+
int readBytes;
48+
while ((readBytes = snappyIn.read(buf)) != -1) {
4849
out.write(buf, 0, readBytes);
4950
}
5051
out.flush();

0 commit comments

Comments
 (0)