Merge pull request #1852 from silvergasp/mem_s

fix: Replace device calls to memcpy with tu_memcpy_s
This commit is contained in:
Ha Thach
2023-02-27 10:22:53 +07:00
committed by GitHub
9 changed files with 44 additions and 26 deletions

View File

@@ -182,7 +182,7 @@ uint32_t tud_midi_n_stream_read(uint8_t itf, uint8_t cable_num, void* buffer, ui
uint8_t const count = (uint8_t) tu_min32(stream->total - stream->index, bufsize);
// Skip the header (1st byte) in the buffer
memcpy(buf8, stream->buffer + 1 + stream->index, count);
TU_VERIFY(0 == tu_memcpy_s(buf8, bufsize, stream->buffer + 1 + stream->index, count));
total_read += count;
stream->index += count;