Skip to content
Commit 51726f36 authored by Robert Lubos's avatar Robert Lubos Committed by Fabio Baltieri
Browse files

net: l2: ieee802154: shell: Validate address on input



Associate command handler did not validate the provided address length.
In result, if provided address string was longer than the expected
extended address size, strncpy() would not NULL terminate the buffer,
which could lead to unexpected behavior in parse_extended_address(), as
it expects NULL terminated string.

Fix this by validating the length of the provided address string before
parsing.

Additionally, make parse_extended_address() return the parsing result,
so that it can be detected when provided extended address has incorrect
format.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 6135ae0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment