NetworkUtils: fix IndexOutOfBoundsException (#66)

http://findbugs.sourceforge.net/bugDescriptions.html#RANGE_ARRAY_LENGTH

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
This commit is contained in:
champtar 2016-04-20 21:54:04 +02:00 committed by Ingo Bauersachs
parent 8536ff347b
commit ce4126701e

View File

@ -530,7 +530,7 @@ public class NetworkUtils
if (isMappedIPv4Addr(addr))
{
byte[] newAddr = new byte[IN4_ADDR_SIZE];
System.arraycopy(addr, 12, newAddr, 0, IN6_ADDR_SIZE);
System.arraycopy(addr, 12, newAddr, 0, IN4_ADDR_SIZE);
return newAddr;
}