diff options
author | Keith Packard <keithp@keithp.com> | 2013-12-17 23:50:54 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-17 23:53:59 -0800 |
commit | 1f035ac2df1cfa6964ae904aba0aedde279ca921 (patch) | |
tree | 414d4c682171f212212d82b20b36134abfd43536 /src | |
parent | 1280ba2e51b36f417f3adb6d101405ee75e7e509 (diff) |
altos: Use all 16 bits of setup packet len when limiting reply len
We were only using the low 8 bits of the setup packet reply max len,
which meant that if the other side sent a weird max len (as Windows 7
does), then we'd truncate our setup reply to whatever was in the low 8
bits of that value.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lpc/ao_usb_lpc.c | 2 | ||||
-rw-r--r-- | src/stm/ao_usb_stm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lpc/ao_usb_lpc.c b/src/lpc/ao_usb_lpc.c index 144d1075..108822ce 100644 --- a/src/lpc/ao_usb_lpc.c +++ b/src/lpc/ao_usb_lpc.c @@ -450,7 +450,7 @@ ao_usb_ep0_out_set(uint8_t *data, uint8_t len) } static void -ao_usb_ep0_in_start(uint8_t max) +ao_usb_ep0_in_start(uint16_t max) { /* Don't send more than asked for */ if (ao_usb_ep0_in_len > max) diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c index 11dde92e..b00390ec 100644 --- a/src/stm/ao_usb_stm.c +++ b/src/stm/ao_usb_stm.c @@ -572,7 +572,7 @@ ao_usb_ep0_out_set(uint8_t *data, uint8_t len) } static void -ao_usb_ep0_in_start(uint8_t max) +ao_usb_ep0_in_start(uint16_t max) { /* Don't send more than asked for */ if (ao_usb_ep0_in_len > max) |