Skip to content

Commit eccea31

Browse files
committed
Suppress memcpy flaw as checked above.
1 parent 31d33de commit eccea31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/zenoh-pico/protocol/iobuf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ static inline void _z_iosli_read_bytes(_z_iosli_t *ios, uint8_t *dst, size_t off
8282
static inline void _z_iosli_copy_bytes(_z_iosli_t *dst, const _z_iosli_t *src) {
8383
size_t length = _z_iosli_readable(src);
8484
assert(dst->_capacity >= length);
85+
// SAFETY: Checked by assert above.
86+
// Flawfinder: ignore [CWE-120]
8587
(void)memcpy(dst->_buf, src->_buf + src->_r_pos, length);
8688
dst->_r_pos = 0;
8789
dst->_w_pos = length;

0 commit comments

Comments
 (0)