[FFmpeg-devel] [PATCH] avfilter/formats: fix segfault when allocation fails
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Wed Dec 9 03:57:51 CET 2015
On Sat, Dec 5, 2015 at 2:43 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> This is a somewhat subtle failure that can occur when the realloc_array
> fails in FORMATS_REF.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
> libavfilter/formats.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/formats.c b/libavfilter/formats.c
> index 2b13cbf..95a6b11 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -445,7 +445,7 @@ do { \
> do { \
> int idx = -1; \
> \
> - if (!*ref) \
> + if (!*ref || !(*ref)->refs) \
> return; \
> \
> FIND_REF_INDEX(ref, idx); \
> --
> 2.6.3
>
Ping; want to get this in together with the avfilter memleak patches. Thanks.
More information about the ffmpeg-devel
mailing list