@ -281,13 +281,13 @@ static int ape_read_header(AVFormatContext * s)
ape - > seektable = av_malloc ( ape - > seektablelength ) ;
ape - > seektable = av_malloc ( ape - > seektablelength ) ;
if ( ! ape - > seektable )
if ( ! ape - > seektable )
return AVERROR ( ENOMEM ) ;
return AVERROR ( ENOMEM ) ;
for ( i = 0 ; i < ape - > seektablelength / sizeof ( uint32_t ) ; i + + )
for ( i = 0 ; i < ape - > seektablelength / sizeof ( uint32_t ) & & ! pb - > eof_reached ; i + + )
ape - > seektable [ i ] = avio_rl32 ( pb ) ;
ape - > seektable [ i ] = avio_rl32 ( pb ) ;
if ( ape - > fileversion < 3810 ) {
if ( ape - > fileversion < 3810 ) {
ape - > bittable = av_malloc ( ape - > totalframes ) ;
ape - > bittable = av_malloc ( ape - > totalframes ) ;
if ( ! ape - > bittable )
if ( ! ape - > bittable )
return AVERROR ( ENOMEM ) ;
return AVERROR ( ENOMEM ) ;
for ( i = 0 ; i < ape - > totalframes ; i + + )
for ( i = 0 ; i < ape - > totalframes & & ! pb - > eof_reached ; i + + )
ape - > bittable [ i ] = avio_r8 ( pb ) ;
ape - > bittable [ i ] = avio_r8 ( pb ) ;
}
}
} else {
} else {