Skip to content

Commit 1063ed0

Browse files
committed
Improve handling ZInflaterInputStream's buffer error.
DEVSIX-1914
1 parent 52b3d66 commit 1063ed0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

itext/itext.io/itext/io/util/zlib/ZInflaterInputStream.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,8 @@ public override int Read(byte[] b, int off, int len) {
136136
nomoreinput=true;
137137
}
138138
}
139-
err=z.inflate(flushLevel);
140-
if(nomoreinput&&(err==JZlib.Z_BUF_ERROR))
141-
return(0);
142-
if(err!=JZlib.Z_OK && err!=JZlib.Z_STREAM_END)
139+
err = z.inflate(flushLevel);
140+
if (err!=JZlib.Z_OK && err!=JZlib.Z_STREAM_END)
143141
throw new IOException("inflating: "+z.msg);
144142
if((nomoreinput||err==JZlib.Z_STREAM_END)&&(z.avail_out==len))
145143
return(0);

0 commit comments

Comments
 (0)