Skip to content

Commit 33cb335

Browse files
PavelVPVm-alperen-sener
authored andcommitted
[nrf fromtree] bluetooth: mesh: delayable_msg: cast to avoid truncation issue
Explicitly cast Kconfig option value to avoid truncation issue reported by Coverity. Fixes #84697 Coverity-CID: 487737 Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit b7f16f1)
1 parent fc18aaa commit 33cb335

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/mesh/delayable_msg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static bool push_msg_from_delayable_msgs(void)
179179
NET_BUF_SIMPLE_DEFINE(buf, BT_MESH_TX_SDU_MAX);
180180

181181
SYS_SLIST_FOR_EACH_NODE(&msg->chunks, node) {
182-
uint16_t tmp = MIN(CONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_SIZE, len);
182+
uint16_t tmp = MIN((uint16_t)CONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_SIZE, len);
183183

184184
chunk = CONTAINER_OF(node, struct delayable_msg_chunk, node);
185185
memcpy(net_buf_simple_add(&buf, tmp), chunk->data, tmp);

0 commit comments

Comments
 (0)