Details
-
Type:
Bug
-
Status: Resolved
-
Resolution: Fixed
-
Affects Version/s: Minecraft 1.12.2
-
Fix Version/s: Minecraft 17w45b
-
Labels:
-
Confirmation Status:Confirmed
Description
See the function MinecraftServer#applyServerIconToResponse, in particular this section:
ByteBuf bytebuf = Unpooled.buffer(); try { BufferedImage bufferedimage = ImageIO.read(file1); Validate.validState(bufferedimage.getWidth() == 64, "Must be 64 pixels wide"); Validate.validState(bufferedimage.getHeight() == 64, "Must be 64 pixels high"); ImageIO.write(bufferedimage, "PNG", new ByteBufOutputStream(bytebuf)); ByteBuf bytebuf1 = Base64.encode(bytebuf); response.setFavicon("data:image/png;base64," + bytebuf1.toString(StandardCharsets.UTF_8)); } catch (Exception exception) { LOGGER.error("Couldn't load server icon", (Throwable)exception); } finally { bytebuf.release(); }
While the original bytebuf is released, bytebuf1 is not.
Attachments
Issue Links
- relates to
-
MC-121884 Server->Client custom payload packets can leak resources
- Reopened
- links to