ext: lib: mgmt: mcumgr: update to latest master

This update to the latest master of mcumgr fixes a memory corruption in
the image management and updates the readme.

Fixes #7924

Origin: mcumgr
License: Apache 2.0
URL: https://github.com/apache/mynewt-mcumgr
commit: a837a731b94927c6198e39744cd6d979be23942a
Purpose: Fix memory corruption
Maintained-by: External

Signed-off-by: Johannes Hutter <johannes@proglove.de>
This commit is contained in:
Johannes Hutter 2018-07-03 19:02:35 +02:00 committed by Carles Cufí
parent c7875b75aa
commit 414291cc12
2 changed files with 7 additions and 3 deletions

View file

@ -16,8 +16,8 @@ both the Apache Mynewt and Zephyr operating systems.
For tips on using mcumgr with your particular OS, see the appropriate file from
the list below:
* README-mynewt.md
* README-zephyr.md
* [Mynewt](README-mynewt.md)
* [Zephyr](README-zephyr.md)
## Dependencies

View file

@ -251,7 +251,11 @@ img_mgmt_state_read(struct mgmt_ctxt *ctxt)
int
img_mgmt_state_write(struct mgmt_ctxt *ctxt)
{
uint8_t hash[IMAGE_HASH_LEN];
/*
* We add 1 to the 32-byte hash buffer as _cbor_value_copy_string() adds
* a null character at the end of the buffer.
*/
uint8_t hash[IMAGE_HASH_LEN + 1];
size_t hash_len;
bool confirm;
int slot;