[vlc-devel] commit: SAP: remotely trigerrable memory leak (CID #70) ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Jul 1 21:39:14 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Jul  1 22:39:33 2008 +0300| [6a86b0b081476c6eb90d3555041ad949a805a580]

SAP: remotely trigerrable memory leak (CID #70)

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

 modules/services_discovery/sap.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index a666469..4aa0f1f 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -808,7 +808,11 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
             p_sdp->psz_uri = NULL;
     }
 
-    if( p_sdp->psz_uri == NULL ) return VLC_EGENERIC;
+    if( p_sdp->psz_uri == NULL )
+    {
+        FreeSDP( p_sdp );
+        return VLC_EGENERIC;
+    }
 
     for( i = 0 ; i< p_sd->p_sys->i_announces ; i++ )
     {




More information about the vlc-devel mailing list