Added robustness to bad length Audio 1.0 packets (bug #11032)

This commit is contained in:
Ross Owen
2013-06-10 15:47:49 +01:00
parent 9fcfac7996
commit b2491e95c9

View File

@@ -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 */