mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-01 03:19:13 +00:00
465053 Prevent gzip buffer overflow on complete
This commit is contained in:
parent
5bde7f34ea
commit
8aeec6803c
@ -316,8 +316,11 @@ public class GzipHttpOutput extends HttpOutput
|
||||
BufferUtil.compact(_buffer);
|
||||
int off=_buffer.arrayOffset()+_buffer.limit();
|
||||
int len=_buffer.capacity()-_buffer.limit()- (_complete?8:0);
|
||||
int produced=_deflater.deflate(_buffer.array(),off,len,Deflater.NO_FLUSH);
|
||||
_buffer.limit(_buffer.limit()+produced);
|
||||
if (len>0)
|
||||
{
|
||||
int produced=_deflater.deflate(_buffer.array(),off,len,Deflater.NO_FLUSH);
|
||||
_buffer.limit(_buffer.limit()+produced);
|
||||
}
|
||||
boolean complete=_deflater.finished();
|
||||
if (complete)
|
||||
addTrailer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user