]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Check sampling index validity for AAC decoding
authorsuperdump <superdump@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 10 Feb 2009 13:47:50 +0000 (13:47 +0000)
committersuperdump <superdump@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 10 Feb 2009 13:47:50 +0000 (13:47 +0000)
Patch by Jai Menon ( jmenon86 gmail com )

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17131 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/aac.c

index 87b58bcc4f6cfad696214a8331bd987094ef1763..7275430a8d57bc7db7b4ae8e9ec70b8f42430865 100644 (file)
@@ -1555,6 +1555,10 @@ static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data
             av_log(avccontext, AV_LOG_ERROR, "Error decoding AAC frame header.\n");
             return -1;
         }
+        if (ac->m4ac.sampling_index > 11) {
+            av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index);
+            return -1;
+        }
     }
 
     // parse