diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-29 22:37:31 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-29 22:37:31 +0100 |
commit | feecc0214decb6d1b9911aafe140034449266430 (patch) | |
tree | bbb57e14136d25b0494ddfa5bd83c74036e9049a /plugins/vorbis | |
parent | 4c02ecf430b6be731ccde16e87a52796becb4359 (diff) |
fix for potential bug in vorbis plugin
Diffstat (limited to 'plugins/vorbis')
-rw-r--r-- | plugins/vorbis/vorbis.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c index 7479d7a0..8ac17540 100644 --- a/plugins/vorbis/vorbis.c +++ b/plugins/vorbis/vorbis.c @@ -176,6 +176,11 @@ cvorbis_init (DB_playItem_t *it) { trace ("not a vorbis stream\n"); return -1; } + if (vi->rate <= 0) { + cvorbis_free (); + trace ("vorbis: bad samplerate\n"); + return -1; + } plugin.info.bps = 16; //plugin.info.dataSize = ov_pcm_total (&vorbis_file, -1) * vi->channels * 2; plugin.info.channels = vi->channels; |