func: static int CVE_2012_2797_PATCHED_decode_frame_mp3on4(AVCodecContext *avctx, void int *got_frame_ptr, AVPacket *avpkt) const uint8_t * buf = avpkt -> data ; int buf_size = avpkt -> size ; MP3On4DecodeContext * s = avctx -> priv_data ; MPADecodeContext * m ; int fsize , len = buf_size , out_size = 0 ; uint32_t header ; int fr , j , n , ch , ret ; s -> frame -> nb_samples = s -> frames * MPA_FRAME_SIZE; if ( ( ret = avctx -> get_buffer ( avctx , s -> frame ) ) < 0 )  if ( buf_size < HEADER_SIZE )  avctx -> bit_rate = 0; ch = 0; for (fr = 0; fr < s->frames; fr++) fsize = AV_RB16 ( buf ) >> 4; fsize = FFMIN3 ( fsize , len , MPA_MAX_CODED_FRAME_SIZE ); m = s -> mp3decctx [ fr ]; assert ( m != NULL ); if ( fsize < HEADER_SIZE )  header = ( AV_RB32 ( buf ) & 0x000fffff ) | s -> syncword; if ( ff_mpa_check_header ( header ) < 0 )  if ( ch + m -> nb_channels > avctx -> channels )  ch += m -> nb_channels; buf += fsize; len -= fsize; avctx -> bit_rate += m -> bit_rate; 