[coap] process Option Length = 0xf as a format error (#3530)

This commit is contained in:
Jonathan Hui
2019-01-29 08:55:59 -08:00
committed by GitHub
parent 3101ba7f0e
commit 96076d3aa4
+1 -1
View File
@@ -268,7 +268,7 @@ const otCoapOption *Message::GetNextOption(void)
}
else
{
ExitNow();
ExitNow(error = OT_ERROR_PARSE);
}
VerifyOrExit(optionLength <= GetLength() - GetHelpData().mNextOptionOffset, error = OT_ERROR_PARSE);