mirror of
https://github.com/espressif/openthread.git
synced 2026-09-06 01:00:09 +00:00
[dns-client] validate response timeout <= TimerMilli::kMaxDelay (#8275)
This commit is contained in:
@@ -738,6 +738,10 @@ Error Client::AllocateQuery(const QueryInfo &aInfo, const char *aLabel, const ch
|
||||
{
|
||||
Error error = kErrorNone;
|
||||
|
||||
aQuery = nullptr;
|
||||
|
||||
VerifyOrExit(aInfo.mConfig.GetResponseTimeout() <= TimerMilli::kMaxDelay, error = kErrorInvalidArgs);
|
||||
|
||||
aQuery = Get<MessagePool>().Allocate(Message::kTypeOther);
|
||||
VerifyOrExit(aQuery != nullptr, error = kErrorNoBufs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user