On Thu, Nov 24, 2011 at 11:26:40AM +0100, Anton Khirnov wrote:
> From: Reimar Döffinger <[email protected]>
> 
> Since it contains dimensions parsing an invalid one has rather
> annoying effects.
> 
> Signed-off-by: Anton Khirnov <[email protected]>
> ---
>  libavcodec/nuv.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
> index 7bace2e..7cb94cb 100644
> --- a/libavcodec/nuv.c
> +++ b/libavcodec/nuv.c
> @@ -184,8 +184,8 @@ static int decode_frame(AVCodecContext *avctx, void 
> *data, int *data_size,
>      }
>      if (c->codec_frameheader) {
>          int w, h, q;
> -        if (buf_size < 12) {
> -            av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame\n");
> +        if (buf[0] != 'V' || buf_size < 12) {
> +            av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame (wrong 
> codec_tag?)\n");
>              return -1;
>          }
>          w = AV_RL16(&buf[6]);
> -- 

probably OK
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to