[vlc-commits] stream_filter: limit probing recursion (fixes #17670)

Rémi Denis-Courmont git at videolan.org
Wed Nov 23 20:41:56 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 23 21:39:57 2016 +0200| [5eab2397a86ca6bed93664cd3735945323e54d48] | committer: Rémi Denis-Courmont

stream_filter: limit probing recursion (fixes #17670)

This limits the number of filters that are probed automatically. There
are no valid use cases for a large number of autoprobed filters.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5eab2397a86ca6bed93664cd3735945323e54d48
---

 src/input/stream_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/input/stream_filter.c b/src/input/stream_filter.c
index a457306..eeae19f 100644
--- a/src/input/stream_filter.c
+++ b/src/input/stream_filter.c
@@ -70,7 +70,8 @@ error:
 /* Add automatic stream filter */
 stream_t *stream_FilterAutoNew( stream_t *p_source )
 {
-    for( ;; )
+    /* Limit number of entries to avoid infinite recursion. */
+    for( unsigned i = 0; i < 16; i++ )
     {
         stream_t *p_filter = vlc_stream_FilterNew( p_source, NULL );
         if( p_filter == NULL )



More information about the vlc-commits mailing list