This commit is contained in:
MX
2024-04-23 14:54:56 +03:00
parent 3269f751cd
commit c3b59a9dba
2 changed files with 2 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ void bit_buffer_copy_right(BitBuffer* buf, const BitBuffer* other, size_t start_
furi_check(buf);
furi_check(other);
furi_check(bit_buffer_get_size_bytes(other) > start_index);
// TODO: Fix crash
furi_check(buf->capacity_bytes >= bit_buffer_get_size_bytes(other) - start_index);
memcpy(buf->data, other->data + start_index, bit_buffer_get_size_bytes(other) - start_index);