[vlc-commits] vlc_credential: also store empty passwords

Thomas Guillem git at videolan.org
Fri Feb 26 10:59:16 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb 24 11:14:40 2016 +0100| [9721ad1c515c3252149755ee4484e65ad8d5e3fb] | committer: Thomas Guillem

vlc_credential: also store empty passwords

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

 src/misc/keystore.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index 305a078..aa05f04 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -550,8 +550,10 @@ vlc_credential_store(vlc_credential *p_credential, vlc_object_t *p_parent)
         return false;
     }
 
-    bool b_ret = vlc_keystore_store(p_credential->p_keystore, ppsz_values,
-                                    (const uint8_t *)p_credential->psz_password,
+    const uint8_t *p_password = (const uint8_t *)
+        (p_credential->psz_password != NULL ? p_credential->psz_password : "");
+
+    bool b_ret = vlc_keystore_store(p_keystore, ppsz_values, p_password,
                                     -1, psz_label) == VLC_SUCCESS;
     free(psz_label);
     free(psz_path);



More information about the vlc-commits mailing list