1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

lavfi/formats: fix segfault when allocation fails

This is a somewhat subtle failure that can occur when the realloc_array
fails in FORMATS_REF.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
Ganesh Ajjanagadde 2015-12-05 13:09:24 -05:00
parent 46cbb4c231
commit 93afb338a4

View File

@ -445,7 +445,7 @@ do { \
do { \
int idx = -1; \
\
if (!*ref) \
if (!*ref || !(*ref)->refs) \
return; \
\
FIND_REF_INDEX(ref, idx); \