Fix a buffer leak in BinaryMemcacheDecoder

This commit is contained in:
Trustin Lee 2013-12-07 15:00:32 +09:00
parent acf7dbf811
commit ccd231b8f4

View File

@ -96,7 +96,8 @@ public abstract class BinaryMemcacheDecoder<M extends BinaryMemcacheMessage<H>,
return;
}
currentKey = readBytes(ctx.alloc(), in, keyLength).toString(CharsetUtil.UTF_8);
currentKey = in.toString(in.readerIndex(), keyLength, CharsetUtil.UTF_8);
in.skipBytes(keyLength);
}
out.add(buildMessage(currentHeader, currentExtras, currentKey));