Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Default readArray to capping to readableBytes instead of Short.MAX_VALUE
Browse files Browse the repository at this point in the history
  • Loading branch information
Thinkofname committed Mar 30, 2016
1 parent 1dda27e commit 7179dd4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void writeArray(byte[] b, ByteBuf buf)

public static byte[] readArray(ByteBuf buf)
{
return readArray( buf, Short.MAX_VALUE );
return readArray( buf, buf.readableBytes() );
}

public static byte[] readArray(ByteBuf buf, int limit)
Expand Down

0 comments on commit 7179dd4

Please sign in to comment.