Skip to content

Commit

Permalink
[posix] fixed uninitialized pointer read (openthread#9552)
Browse files Browse the repository at this point in the history
This commit added validation for whether the pointer (reqs) being
freed is nullptr or not.
  • Loading branch information
hastigondaliya committed Oct 26, 2023
1 parent 9106817 commit 0ec70b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/posix/platform/infra_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,9 +671,9 @@ void InfraNetif::DiscoverNat64PrefixDone(union sigval sv)

otError InfraNetif::DiscoverNat64Prefix(uint32_t aInfraIfIndex)
{
otError error = OT_ERROR_NONE;
struct addrinfo *hints = nullptr;
struct gaicb *reqs[1];
otError error = OT_ERROR_NONE;
struct addrinfo *hints = nullptr;
struct gaicb *reqs[1] = {nullptr};
struct sigevent sig;
int status;

Expand Down

0 comments on commit 0ec70b2

Please sign in to comment.