forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: Robert Lubos <robert.lubos@nordicsemi.no>
- Loading branch information
Showing
1 changed file
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters