mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 20:27:47 +00:00
[ncp-base] fix the POKE command handler (#2294)
This commit is contained in:
committed by
Jonathan Hui
parent
c1a72f84c9
commit
01d44ebeed
@@ -1330,9 +1330,9 @@ otError NcpBase::CommandHandler_POKE(uint8_t aHeader)
|
||||
const uint8_t *dataPtr = NULL;
|
||||
uint16_t dataLen;
|
||||
|
||||
SuccessOrExit(error = mDecoder.ReadUint32(address));
|
||||
SuccessOrExit(error = mDecoder.ReadUint16(count));
|
||||
SuccessOrExit(error = mDecoder.ReadData(dataPtr, dataLen));
|
||||
SuccessOrExit(parseError = mDecoder.ReadUint32(address));
|
||||
SuccessOrExit(parseError = mDecoder.ReadUint16(count));
|
||||
SuccessOrExit(parseError = mDecoder.ReadData(dataPtr, dataLen));
|
||||
|
||||
VerifyOrExit(count != 0, parseError = OT_ERROR_INVALID_ARGS);
|
||||
VerifyOrExit(count <= dataLen, parseError = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
Reference in New Issue
Block a user