comparison utils.c @ 5707:c46509aca422 libavcodec

Remove check for input buffer size as it does not guarantee that decoder will not run out of output buffer bounds (and all suspected decoders have their own checks now).
author kostya
date Mon, 24 Sep 2007 16:50:32 +0000
parents 3e8764a25c53
children 96d1b6c30aad
comparison
equal deleted inserted replaced
5706:3e8764a25c53 5707:c46509aca422
960 if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){ 960 if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){
961 av_log(avctx, AV_LOG_ERROR, "buffer smaller than AVCODEC_MAX_AUDIO_FRAME_SIZE\n"); 961 av_log(avctx, AV_LOG_ERROR, "buffer smaller than AVCODEC_MAX_AUDIO_FRAME_SIZE\n");
962 return -1; 962 return -1;
963 } 963 }
964 if(*frame_size_ptr < FF_MIN_BUFFER_SIZE || 964 if(*frame_size_ptr < FF_MIN_BUFFER_SIZE ||
965 *frame_size_ptr < avctx->channels * avctx->frame_size * sizeof(int16_t) || 965 *frame_size_ptr < avctx->channels * avctx->frame_size * sizeof(int16_t)){
966 *frame_size_ptr < buf_size){
967 av_log(avctx, AV_LOG_ERROR, "buffer %d too small\n", *frame_size_ptr); 966 av_log(avctx, AV_LOG_ERROR, "buffer %d too small\n", *frame_size_ptr);
968 return -1; 967 return -1;
969 } 968 }
970 969
971 ret = avctx->codec->decode(avctx, samples, frame_size_ptr, 970 ret = avctx->codec->decode(avctx, samples, frame_size_ptr,