summaryrefslogtreecommitdiffstats
path: root/mp3lib
diff options
context:
space:
mode:
Diffstat (limited to 'mp3lib')
-rw-r--r--mp3lib/sr1.c2
1 files changed, 2 insertions, 0 deletions
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);