changeset 1166:95f6f14176c6

fr->sampling_frequency limitation (thanx to pl <p_l@tfz.net>)
author arpi_esp
date Tue, 19 Jun 2001 22:07:19 +0000
parents 35d687605d2b
children 37d6e98cb645
files mp3lib/sr1.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mp3lib/sr1.c	Tue Jun 19 22:03:05 2001 +0000
+++ b/mp3lib/sr1.c	Tue Jun 19 22:07:19 2001 +0000
@@ -196,6 +196,8 @@
     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);