Skip to content

Commit adeaa63

Browse files
mgmt: mcumgr: img_mgmt_client: avoid using uninitialized variable
Make sure temp_data is initialized before use. Fixes: #68636 Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent 9e28e9e commit adeaa63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/mgmt/mcumgr/grp/img_mgmt_client/src/img_mgmt_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static size_t upload_message_header_size(struct img_gr_upload *upload_state)
255255
int map_count;
256256
zcbor_state_t zse[CONFIG_MCUMGR_SMP_CBOR_MAX_DECODING_LEVELS + 2];
257257
uint8_t temp_buf[MCUMGR_UPLOAD_INIT_HEADER_BUF_SIZE];
258-
uint8_t temp_data;
258+
uint8_t temp_data = 0U;
259259

260260
/* Calculation of message header with data length of 1 */
261261

0 commit comments

Comments
 (0)