Bugfix: Only reads the replyRecord when map data present bit is set

Change-Id: Id4bd28c1bd4f8ad7a6e92f8812cff0f1e66a2048
This commit is contained in:
Jian Li 2017-04-07 00:47:56 +09:00
parent b471f2c7b6
commit af72941251

View File

@ -375,7 +375,12 @@ public final class DefaultLispMapRequest extends AbstractLispMessage
}
// reply record -> 32 bits
int replyRecord = byteBuf.readInt();
int replyRecord = 0;
// only obtains the reply record when map data present bit is set
if (mapDataPresent) {
replyRecord = byteBuf.readInt();
}
return new DefaultRequestBuilder()
.withIsAuthoritative(authoritative)