Module: libav
Branch: master
Commit: f160c6a18a574b4c7d063e0a748037cbbd9912ee

Author:    Anton Khirnov <[email protected]>
Committer: Anton Khirnov <[email protected]>
Date:      Sun Apr  7 07:33:24 2013 +0200

lavfi: do not segfault on NULL passed to avfilter_get_by_name()

---

 libavfilter/avfilter.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 199d8f9..8f028e1 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;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to