From ca9cc28c62a2c2877186569f4ab0cf1034502a73 Mon Sep 17 00:00:00 2001 From: balrog Date: Mon, 14 Jan 2008 04:24:29 +0000 Subject: pthreads-based audio and miscellaneous audio clean-up (malc). ESD support (malc, Frederick Reeve). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3917 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/sb16.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hw/sb16.c') diff --git a/hw/sb16.c b/hw/sb16.c index effbfbcf8d..c22de7a715 100644 --- a/hw/sb16.c +++ b/hw/sb16.c @@ -1193,6 +1193,12 @@ static int SB_read_DMA (void *opaque, int nchan, int dma_pos, int dma_len) SB16State *s = opaque; int till, copy, written, free; + if (s->block_size <= 0) { + dolog ("invalid block size=%d nchan=%d dma_pos=%d dma_len=%d\n", + s->block_size, nchan, dma_pos, dma_len); + return dma_pos; + } + if (s->left_till_irq < 0) { s->left_till_irq = s->block_size; } -- cgit v1.2.1