Skip to content

Commit

Permalink
Fix unbounded expansion of cumulative buffer in SslHandler
Browse files Browse the repository at this point in the history
Related: #3567

Motivation:

SslHandler.channelReadComplete() forgets to call
super.channelReadComplete(), which discards read bytes from the
cumulative buffer.  As a result, the cumulative buffer can expand its
capacity unboundedly.

Modifications:

Call super.channelReadComplete() instead of calling
ctx.fireChannelReadComplete()

Result:

Fixes #3567
  • Loading branch information
trustin committed Apr 2, 2015
1 parent 28caa87 commit 4d8f824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler/src/main/java/io/netty/handler/ssl/SslHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
ctx.read();
}

ctx.fireChannelReadComplete();
super.channelReadComplete(ctx);
}

/**
Expand Down

0 comments on commit 4d8f824

Please sign in to comment.