[vlc-devel] [PATCH] trivial fix of segfault in VLM

Matthew Hodgson matthew at mxtelecom.com
Fri Nov 4 12:26:16 CET 2005


There's a bug in the error reporting of the string quoting functionality in 
vlm.c - if you don't terminate quotes on your MRL, FindEndCommand returns 
false and ExecuteCommand skips to the error label which sends the error 
message in p_message to the client.  Only p_message is uninitialised.

 > new foo broadcast enabled

 > setup foo input 'crazy mrl
<segfault>

This fixes it:


Index: vlm.c
===================================================================
--- vlm.c       (revision 12389)
+++ vlm.c       (working copy)
@@ -360,7 +360,10 @@

              psz_temp = FindEndCommand( psz_cmd );

-            if( psz_temp == NULL ) goto error;
+            if( psz_temp == NULL ) {
+                p_message = vlm_MessageNew( "Couldnt find end of command", 
psz_cmd );
+                goto error;
+            }

              i_temp = psz_temp - psz_cmd;


-- 
______________________________________________________________
Matthew Hodgson   matthew at mxtelecom.com   Tel: +44 845 6667778
                 Systems Analyst, MX Telecom Ltd.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list