zephyr/subsys/mgmt
Siddharth Chandrasekaran 061a87aff8 mgmt/osdp: Replace __ASSERT() with an explicit if
Commit c7fec71193 ("mgmt/osdp: Add length checks for commands and
replies") attempted to remove code duplication by adding a macro to perform
a length check. At the time, a CI linter did not like macros with control
flow so the code was switched to a method which called __ASSERT() on this
condition.

The __ASSERT() macro is a nop if CONFIG_ASSERT=n (which is the default) and
causes the buffer access to be unguarded which may lead to OOB accesses.
This patch fixes the issue by reintroducing the if check.

Fixes: c7fec71193.
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-11-23 09:59:52 +01:00
..
ec_host_cmd mgmt: ec_host_cmd: improve handling buffer sizes 2023-10-27 13:26:00 -05:00
hawkbit mgmt: hawkbit: remove NET_SOCKETS_POSIX_NAMES dependency 2023-06-28 06:32:45 +00:00
mcumgr shell: backends: uart: add public function to access smp shell data 2023-11-15 16:38:16 +01:00
osdp mgmt/osdp: Replace __ASSERT() with an explicit if 2023-11-23 09:59:52 +01:00
updatehub mgmt: updatehub: Fix CMakeLists.txt file 2023-11-21 08:48:04 +00:00
CMakeLists.txt ec_host_cmd: add ec host command handler framework 2020-09-04 14:50:45 -04:00
Kconfig ec_host_cmd: add ec host command handler framework 2020-09-04 14:50:45 -04:00