mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
cardem: Fix infinite loop + watchdog reset on long OUT message
In dispatch_received_usb_msg(), we ran into an infinite loop if a too long messages was received on the OUT EP. Let's break the loop. Change-Id: I5325ed15d3dd79a42f8dac34d618e86b9334c301 Closes: OS#4429
This commit is contained in:
@@ -682,6 +682,7 @@ static void dispatch_received_msg(struct msgb *msg, struct cardem_inst *ci)
|
||||
TRACE_ERROR("%u: Unexpected large message (%u bytes)\n",
|
||||
ci->num, mh->msg_len);
|
||||
usb_buf_free(segm);
|
||||
break;
|
||||
} else {
|
||||
uint8_t *cur = msgb_put(segm, mh->msg_len);
|
||||
segm->l1h = segm->head;
|
||||
|
||||
Reference in New Issue
Block a user