From f160c6a18a574b4c7d063e0a748037cbbd9912ee Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 7 Apr 2013 07:33:24 +0200 Subject: lavfi: do not segfault on NULL passed to avfilter_get_by_name() --- libavfilter/avfilter.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavfilter/avfilter.c') diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 199d8f97fc..8f028e1122 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -273,6 +273,9 @@ AVFilter *avfilter_get_by_name(const char *name) { AVFilter *f = NULL; + if (!name) + return NULL; + while ((f = avfilter_next(f))) if (!strcmp(f->name, name)) return f; -- cgit v1.2.3