summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell2016-10-27 18:24:29 +0200
committerPeter Maydell2016-10-27 18:24:29 +0200
commit835f3d24b42fcbeca5c49048994a4e5d0fe905c5 (patch)
tree1633e268460196463bd94c964226cae5bc5529f2 /hw
parentMerge remote-tracking branch 'remotes/rth/tags/pull-atomic-20161026' into sta... (diff)
parentaudio: intel-hda: check stream entry count during transfer (diff)
downloadqemu-835f3d24b42fcbeca5c49048994a4e5d0fe905c5.tar.gz
qemu-835f3d24b42fcbeca5c49048994a4e5d0fe905c5.tar.xz
qemu-835f3d24b42fcbeca5c49048994a4e5d0fe905c5.zip
Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20161027-1' into staging
audio: intel-hda: check stream entry count during transfer # gpg: Signature made Thu 27 Oct 2016 15:30:51 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # 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/pull-audio-20161027-1: audio: intel-hda: check stream entry count during transfer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/audio/intel-hda.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index cd95340cd9..537face94d 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -416,7 +416,8 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
}
left = len;
- while (left > 0) {
+ s = st->bentries;
+ while (left > 0 && s-- > 0) {
copy = left;
if (copy > st->bsize - st->lpib)
copy = st->bsize - st->lpib;