apache / mynewt-mcumgr

Apache mynewt
https://mynewt.apache.org/
99 stars 76 forks source link

zephyr: Fix usage of zephyr_img_mgmt_flash_area_id #150

Closed de-nordic closed 3 years ago

de-nordic commented 3 years ago

The zephyr_img_mgmt_flash_area_id is allowed to return negative value as error, but due to lack of checks that value could be passed to functions with poor parameter checks, causing a softare to crash.

Signed-off-by: Dominik Ermel dominik.ermel@nordicsemi.no