qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4699] Check the returned audio_buf_info fields
Date: Sun, 08 Jun 2008 04:27:56 +0000	[thread overview]
Message-ID: <E1K5CVY-0007Zr-Sc@cvs.savannah.gnu.org> (raw)

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;

                 reply	other threads:[~2008-06-08  4:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1K5CVY-0007Zr-Sc@cvs.savannah.gnu.org \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).