forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTTP/2 Buffer Leak if UTF8 Conversion Fails
Motivation: Http2CodecUtil uses ByteBufUtil.writeUtf8 but does not account for it throwing an exception. If an exception is thrown because the format is not valid UTF16 encoded UTF8 then the buffer will leak. Modifications: - Make sure the buffer is released if an exception is thrown - Ensure call sites of the Http2CodecUtil.toByteBuf can tolerate and exception being thrown Result: No leak if exception data can not be converted to UTF8.
- Loading branch information
1 parent
a75dcb2
commit 7a7160f
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters