diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-27 17:24:29 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-27 17:24:29 +0100 |
commit | 835f3d24b42fcbeca5c49048994a4e5d0fe905c5 (patch) | |
tree | 1633e268460196463bd94c964226cae5bc5529f2 | |
parent | 5929d7e8a0e1f43333bc3528b50397ae8dd0fd6b (diff) | |
parent | 0c0fc2b5fd534786051889459848764edd798050 (diff) |
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>
-rw-r--r-- | hw/audio/intel-hda.c | 3 |
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; |