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.
2 parents d13578f + cf1d0e5 commit 59af865Copy full SHA for 59af865
ports/nrf/common-hal/_bleio/PacketBuffer.c
@@ -300,7 +300,8 @@ void common_hal_bleio_packet_buffer_construct(
300
size_t incoming_buffer_size = 0;
301
uint32_t *incoming_buffer = NULL;
302
if (incoming) {
303
- incoming_buffer_size = buffer_size * (sizeof(uint16_t) + max_packet_size);
+ // + 1 needed by ringbuf for empty/full detection.
304
+ incoming_buffer_size = buffer_size * (sizeof(uint16_t) + max_packet_size) + 1;
305
incoming_buffer = m_malloc(incoming_buffer_size, false);
306
}
307
0 commit comments