projects
/
open-ath9k-htc-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
k2_fw_usb_api: add warning on oversized buffer.
[open-ath9k-htc-firmware.git]
/
target_firmware
/
magpie_fw_dev
/
target
/
hif
/
k2_fw_usb_api.c
diff --git
a/target_firmware/magpie_fw_dev/target/hif/k2_fw_usb_api.c
b/target_firmware/magpie_fw_dev/target/hif/k2_fw_usb_api.c
index b549108c145d496be4808beff89b7031fd5a9012..b8adbf43600c018df60ac93c4b48c2a8939a8553 100755
(executable)
--- a/
target_firmware/magpie_fw_dev/target/hif/k2_fw_usb_api.c
+++ b/
target_firmware/magpie_fw_dev/target/hif/k2_fw_usb_api.c
@@
-418,6
+418,10
@@
void vUsb_Reg_Out_patch(void)
// get the size of this transcation
usbfifolen = USB_BYTE_REG_READ(ZM_EP4_BYTE_COUNT_LOW_OFFSET);
// get the size of this transcation
usbfifolen = USB_BYTE_REG_READ(ZM_EP4_BYTE_COUNT_LOW_OFFSET);
+ if (usbfifolen > 0x40) {
+ A_PRINTF("EP4 FIFO Bug? Buffer is too big: %x\n", usbfifolen);
+ goto ERR;
+ }
// check is command is new
if( cmd_is_new ){
// check is command is new
if( cmd_is_new ){