[vlc-commits] http: do not bother with login dialog if there is no realm

Rémi Denis-Courmont git at videolan.org
Mon Apr 29 16:07:04 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 29 17:02:45 2013 +0300| [b01912ebae1a7f3141e3339eb2f9ff2003b996f2] | committer: Rémi Denis-Courmont

http: do not bother with login dialog if there is no realm

Authentication will fail anyway. Also fixes NULL for %s.

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

 modules/access/http.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/access/http.c b/modules/access/http.c
index 5fbd461..583cf4a 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -438,6 +438,11 @@ connect:
 
     if( p_sys->i_code == 401 )
     {
+        if( p_sys->auth.psz_realm == NULL )
+        {
+            msg_Err( p_access, "authentication failed without realm" );
+            goto error;
+        }
         char *psz_login, *psz_password;
         /* FIXME ? */
         if( p_sys->url.psz_username && p_sys->url.psz_password &&



More information about the vlc-commits mailing list