From 1bf0eec09b09f6cb9d4048215890c8a5de605394 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Sat, 16 Dec 2023 03:14:05 +0000 Subject: [PATCH] hosted/remote/protocol_v0_jtag: Fixed a missing widening cast to legalise the packet data in shifting --- src/platforms/hosted/remote/protocol_v0_jtag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/hosted/remote/protocol_v0_jtag.c b/src/platforms/hosted/remote/protocol_v0_jtag.c index ec659d20ea5..8b2a518e1c8 100644 --- a/src/platforms/hosted/remote/protocol_v0_jtag.c +++ b/src/platforms/hosted/remote/protocol_v0_jtag.c @@ -85,7 +85,7 @@ void remote_v0_jtag_tdi_tdo_seq(uint8_t *data_out, bool final_tms, const uint8_t const size_t bytes = (chunk_length + 7U) >> 3U; if (data_in) { for (size_t idx = 0; idx < bytes; ++idx) - packet_data_in |= data_in[offset + idx] << (idx * 8U); + packet_data_in |= (uint32_t)data_in[offset + idx] << (idx * 8U); } /* * Build the remote protocol message to send, and send it.