On Thu, Dec 4, 2014 at 8:00 PM, Nicolas Dufresne
<[email protected]> wrote:
> av_fast_malloc() signature is void*, but this is just a convenience
> not to have to cast. In fact it expect a pointer to pointer. This
> fixes a crash on NULL pointer when playing back H263 Sorensen.
>
> Signed-off-by: Nicolas Dufresne <[email protected]>
> ---
>  libavcodec/svq1dec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
> index 14ff41c..13bbdd1 100644
> --- a/libavcodec/svq1dec.c
> +++ b/libavcodec/svq1dec.c
> @@ -637,7 +637,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void 
> *data,
>              return AVERROR_INVALIDDATA;
>          }
>
> -        av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated,
> +        av_fast_malloc(&s->pkt_swapped, &s->pkt_swapped_allocated,
>                         buf_size);
>          if (!s->pkt_swapped)
>              return AVERROR(ENOMEM);

Looks correct, thanks for your patch.
Queueing with a CC: libav-stable tag.
Cheers
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to