[vlc-commits] http: avoid NULL dereference

Rémi Denis-Courmont git at videolan.org
Wed Apr 23 22:59:19 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 23 23:59:10 2014 +0300| [25f6146e8376fdfa19898fbf996ee169383e9b81] | committer: Rémi Denis-Courmont

http: avoid NULL dereference

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

 modules/access/http.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index 67431cf..22f752d 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -1216,11 +1216,11 @@ static int Request( access_t *p_access, uint64_t i_tell )
     }
 
     /* Authentication */
-    if( p_sys->url.psz_username || p_sys->url.psz_password )
+    if( p_sys->url.psz_username && p_sys->url.psz_password )
         AuthReply( p_access, "", &p_sys->url, &p_sys->auth );
 
     /* Proxy Authentication */
-    if( p_sys->proxy.psz_username || p_sys->proxy.psz_password )
+    if( p_sys->proxy.psz_username && p_sys->proxy.psz_password )
         AuthReply( p_access, "Proxy-", &p_sys->proxy, &p_sys->proxy_auth );
 
     /* ICY meta data request */



More information about the vlc-commits mailing list