Skip to content
Commit 47903616 authored by Robert Lubos's avatar Robert Lubos Committed by Anas Nashif
Browse files

net: lwm2m: Fix possible out-of-bound access when creating FW object



obj_inst_id should not be used directly to index the instance array, as
the instance ID is not tightly bound to the maximum instance count and
can exceed this value, causing out-of-bound access.

Therefore, perform some extra validation when choosing the array index
for the object instance to make sure we stay in the array bounds, or
return an error if there's no more room for more object instances, in a
similar way it's done for Security object.

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