From 2e509f7bb7a365741bdf79948c51b5e91fa3ce0a Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 2 Apr 2015 14:54:29 +0900 Subject: [PATCH] Fix unbounded expansion of cumulative buffer in SslHandler 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 --- handler/src/main/java/io/netty/handler/ssl/SslHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java index a8fabaff56..9970eff926 100644 --- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java +++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java @@ -957,7 +957,7 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH ctx.read(); } - ctx.fireChannelReadComplete(); + super.channelReadComplete(ctx); } /**