* [Qemu-devel] [4699] Check the returned audio_buf_info fields
@ 2008-06-08 4:27 malc
0 siblings, 0 replies; only message in thread
From: malc @ 2008-06-08 4:27 UTC (permalink / raw)
To: qemu-devel
Revision: 4699
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4699
Author: malc
Date: 2008-06-08 04:27:56 +0000 (Sun, 08 Jun 2008)
Log Message:
-----------
Check the returned audio_buf_info fields
At least on one system zero is returned in either fragsize or
fragstotal (reported by Dave Scott), this results in an audio_calloc
failing the audio_bug check and another ominous error message. Fail
early and blame the system.
Modified Paths:
--------------
trunk/audio/ossaudio.c
Modified: trunk/audio/ossaudio.c
===================================================================
--- trunk/audio/ossaudio.c 2008-06-08 01:55:09 UTC (rev 4698)
+++ trunk/audio/ossaudio.c 2008-06-08 04:27:56 UTC (rev 4699)
@@ -254,6 +254,12 @@
goto err;
}
+ if (!abinfo.fragstotal || !abinfo.fragsize) {
+ AUD_log (AUDIO_CAP, "Returned bogus buffer information(%d, %d) for %s\n",
+ abinfo.fragstotal, abinfo.fragsize, typ);
+ goto err;
+ }
+
obt->fmt = fmt;
obt->nchannels = nchannels;
obt->freq = freq;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-08 4:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-08 4:27 [Qemu-devel] [4699] Check the returned audio_buf_info fields malc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).