diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-05 21:09:24 +0300 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-11 18:21:47 +0300 |
commit | 93afb338a405eac0f9e7b092bc26603378bfcca6 (patch) | |
tree | 97afedf7b7271cab68c30da834caf6b67d6430c1 /libavfilter/formats.c | |
parent | 46cbb4c2312c654c44a94054e870840913a80024 (diff) |
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>
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r-- | libavfilter/formats.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 2b13cbf3db..95a6b1188d 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); \ |