lynxis lazus has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42222?usp=email )
Change subject: dfu: fix integer overflow in delay_us()
......................................................................
dfu: fix integer overflow in delay_us()
delay_us(uint16_t) can't handle us > 65535.
Split the 100 ms into 2 function calls.
Change-Id: Ieaf1109c99662a21927901a2e0e3ddac42aa3d3c
---
M sysmoOCTSIM/usb/class/dfu/device/dfudf.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware
refs/changes/22/42222/1
diff --git a/sysmoOCTSIM/usb/class/dfu/device/dfudf.c
b/sysmoOCTSIM/usb/class/dfu/device/dfudf.c
index d9b5520..9f7f7bb 100644
--- a/sysmoOCTSIM/usb/class/dfu/device/dfudf.c
+++ b/sysmoOCTSIM/usb/class/dfu/device/dfudf.c
@@ -198,7 +198,8 @@
__disable_irq();
delay_us(10000);
usbdc_detach();
- delay_us(100000);
+ delay_us(50000);
+ delay_us(50000);
NVIC_SystemReset();
#endif
break;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42222?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ieaf1109c99662a21927901a2e0e3ddac42aa3d3c
Gerrit-Change-Number: 42222
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <[email protected]>