[vlc-devel] commit: Fixed infinite loop in config_ChainDuplicate. (Laurent Aimar )

git version control git at videolan.org
Sun May 31 21:53:31 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun May 31 21:52:35 2009 +0200| [03ddca270c8b2d47bd84d20d316fec7c4a1cc568] | committer: Laurent Aimar 

Fixed infinite loop in config_ChainDuplicate.

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

 src/config/chain.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/config/chain.c b/src/config/chain.c
index 88ad283..13661e5 100644
--- a/src/config/chain.c
+++ b/src/config/chain.c
@@ -416,7 +416,8 @@ config_chain_t *config_ChainDuplicate( const config_chain_t *p_src )
 {
     config_chain_t *p_dst = NULL;
     config_chain_t **pp_last = &p_dst;
-    while( p_src )
+
+    for( ; p_src != NULL; p_src = p_src->p_next )
     {
         config_chain_t *p = malloc( sizeof(*p) );
         if( !p )




More information about the vlc-devel mailing list