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.
Here's the same code in 17w45a (mappingless, but since
MinecraftServer's class name isn't obfuscated, it's easy to find):(Base64 is
java.util.Base64, ByteBuffer isjava.nio.ByteBuffer).I'm pretty sure that means this is fixed in 17w45a (the code was the same as 1.12.2 in 17w43b).