summaryrefslogtreecommitdiff
path: root/src/class/midi
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-02-27 10:22:53 +0700
committerGitHub <[email protected]>2023-02-27 10:22:53 +0700
commit65ac519715ea0ecace08b183f2d8730d0450affd (patch)
tree11c48c98d3afea290e460deed624a07bac0607e7 /src/class/midi
parent73afca14eb589af84e932fdafbeeea8f8db1e771 (diff)
parente34aeb5cf69315d2d7711f0a1d040a28492d026d (diff)
Merge pull request #1852 from silvergasp/mem_s
fix: Replace device calls to memcpy with tu_memcpy_s
Diffstat (limited to 'src/class/midi')
-rw-r--r--src/class/midi/midi_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c
index eb1a770dd..5dea43431 100644
--- a/src/class/midi/midi_device.c
+++ b/src/class/midi/midi_device.c
@@ -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;