From 6c8b41d71ae4bdbef99ba136ed6e880b82a0ef37 Mon Sep 17 00:00:00 2001 From: arpi_esp Date: Tue, 19 Jun 2001 22:07:19 +0000 Subject: fr->sampling_frequency limitation (thanx to pl ) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1167 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp3lib/sr1.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mp3lib') diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c index b90bb16de1..146e12f9f3 100644 --- a/mp3lib/sr1.c +++ b/mp3lib/sr1.c @@ -196,6 +196,8 @@ LOCAL int decode_header(struct frame *fr,unsigned long newhead){ else fr->sampling_frequency = ((newhead>>10)&0x3) + (fr->lsf*3); + if(fr->sampling_frequency>8) return FALSE; // valid: 0..8 + fr->error_protection = ((newhead>>16)&0x1)^0x1; fr->bitrate_index = ((newhead>>12)&0xf); fr->padding = ((newhead>>9)&0x1); -- cgit v1.2.3