aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-01-10 18:45:23 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-01-10 18:45:23 +0000
commit291741033f611a4f0bbce3f7c9dead84ce315f96 (patch)
treea18e38d6663926b2f042a80b3f7b4c63d1c0c926 /hw/usb
parenta311f891abf3833c1e4c5a62a6e5b0f1b81f22c3 (diff)
parenta7fde1c1706a93c304eb301cc290d71c9426493b (diff)
downloadqemu-291741033f611a4f0bbce3f7c9dead84ce315f96.zip
qemu-291741033f611a4f0bbce3f7c9dead84ce315f96.tar.gz
qemu-291741033f611a4f0bbce3f7c9dead84ce315f96.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/audio-20190110-pull-request' into staging
audio: two fixes. # gpg: Signature made Thu 10 Jan 2019 09:23:24 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/audio-20190110-pull-request: usb-audio: ignore usb packages with wrong size hw/audio/marvell: Don't include unnecessary i2c.h header file Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/dev-audio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c
index ee43e49..28ac7c5 100644
--- a/hw/usb/dev-audio.c
+++ b/hw/usb/dev-audio.c
@@ -321,6 +321,9 @@ static int streambuf_put(struct streambuf *buf, USBPacket *p)
if (!free) {
return 0;
}
+ if (p->iov.size != USBAUDIO_PACKET_SIZE) {
+ return 0;
+ }
assert(free >= USBAUDIO_PACKET_SIZE);
usb_packet_copy(p, buf->data + (buf->prod % buf->size),
USBAUDIO_PACKET_SIZE);