aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/ossaudio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 2a300c21de..a29b4bc172 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -254,6 +254,12 @@ static int oss_open (int in, struct oss_params *req,
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;