From b2491e95c964c58d2967a4b93f6f3908c5e433b0 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 10 Jun 2013 15:47:49 +0100 Subject: [PATCH] Added robustness to bad length Audio 1.0 packets (bug #11032) --- module_usb_audio/usb_buffer/decouple.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 00fa6a20..85fa3d47 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -442,7 +442,7 @@ void handle_audio_request(chanend c_mix_out) if (aud_data_remaining_to_device) { /* Round up to nearest word */ - aud_data_remaining_to_device +=3; + aud_data_remaining_to_device +=3 - (unpackState&0x3); aud_data_remaining_to_device &= (~3); /* Skip the rest of this malformed packet */