From 2460b10523aa3b8537f16f2689c2c051c6de720f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 25 Oct 2021 18:42:30 +0200 Subject: [PATCH] uart-bridge: usb_read_bytes: fix usb_buffer access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- uart-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uart-bridge.c b/uart-bridge.c index 8bdd592..9f8ed1c 100644 --- a/uart-bridge.c +++ b/uart-bridge.c @@ -131,7 +131,7 @@ void usb_read_bytes(uint8_t itf) { if (len) { uint32_t count; - count = tud_cdc_n_read(itf, ud->usb_buffer, len); + count = tud_cdc_n_read(itf, &ud->usb_buffer[ud->usb_pos], len); ud->usb_pos += count; }