Fix remote format string injection in SDP parser.
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 7 Jun 2007 17:34:15 +0000 (17:34 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 7 Jun 2007 17:34:15 +0000 (17:34 +0000)
(Sometimes there are good things about NOT being on MBONE)

modules/services_discovery/sap.c

index e5cbc83..117835c 100644 (file)
@@ -812,12 +812,13 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
     psz_value = GetAttribute( p_sap->p_sdp->pp_attributes, p_sap->p_sdp->i_attributes, "tool" );
     if( psz_value != NULL )
     {
     psz_value = GetAttribute( p_sap->p_sdp->pp_attributes, p_sap->p_sdp->i_attributes, "tool" );
     if( psz_value != NULL )
     {
-        input_ItemAddInfo( p_input, _("Session"),_("Tool"), psz_value );
+        input_ItemAddInfo( p_input, _("Session"), _("Tool"), "%s",
+                           psz_value );
     }
     if( strcmp( p_sdp->username, "-" ) )
     {
     }
     if( strcmp( p_sdp->username, "-" ) )
     {
-        input_ItemAddInfo( p_input, _("Session"),
-                                _("User"), p_sdp->username );
+        input_ItemAddInfo( p_input, _("Session"), _("User"), "%s",
+                           p_sdp->username );
     }
 
     /* Handle group */
     }
 
     /* Handle group */