On 2/17/12, Aneesh Dogra <[email protected]> wrote:
> ---
>  libavcodec/sunrast.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
> index fef17b4..d0938e0 100644
> --- a/libavcodec/sunrast.c
> +++ b/libavcodec/sunrast.c
> @@ -77,7 +77,11 @@ static int sunrast_decode_frame(AVCodecContext *avctx,
> void *data,
>          av_log(avctx, AV_LOG_ERROR, "invalid image size\n");
>          return AVERROR_INVALIDDATA;
>      }
> -    if (maptype & ~1) {
> +    if (maptype == RMT_RAW) {
> +        av_log_ask_for_sample(avctx, "unsupported colourmap type\n");
> +        return AVERROR_PATCHWELCOME;
> +    }
> +    if (maptype > RMT_RAW || maptype < RMT_NONE) {

maptype is unsigned so it can not be less than 0 == RMT_NONE
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to