We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22813dd commit 67ce39bCopy full SHA for 67ce39b
subsys/mgmt/mcumgr/smp/src/smp.c
@@ -225,9 +225,15 @@ static int smp_handle_single_payload(struct smp_streamer *cbuf, const struct smp
225
}
226
227
if (handler_fn) {
228
+ bool ok;
229
+
230
*handler_found = true;
- zcbor_map_start_encode(cbuf->writer->zs,
- CONFIG_MCUMGR_SMP_CBOR_MAX_MAIN_MAP_ENTRIES);
231
+ ok = zcbor_map_start_encode(cbuf->writer->zs,
232
+ CONFIG_MCUMGR_SMP_CBOR_MAX_MAIN_MAP_ENTRIES);
233
234
+ if (!ok) {
235
+ return MGMT_ERR_EMSGSIZE;
236
+ }
237
238
#if defined(CONFIG_MCUMGR_SMP_COMMAND_STATUS_HOOKS)
239
cmd_recv.group = req_hdr->nh_group;
0 commit comments