changeset 1171:cbe5598f5de4 trunk

[svn] - keep old passwords if user doesn't change them in configuration
author desowin
date Fri, 08 Jun 2007 04:37:56 -0700
parents 96cc46b1cf5e
children 93dee80e9365
files ChangeLog src/scrobbler/configure.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jun 07 08:28:08 2007 -0700
+++ b/ChangeLog	Fri Jun 08 04:37:56 2007 -0700
@@ -1,3 +1,11 @@
+2007-06-07 15:28:08 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [2528]
+  - fix a possible allocation overflow issue. found while merging to 1.3 stable.
+  
+  trunk/src/evdev-plug/ed_ui.c |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-06-07 13:34:42 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [2504]
   - add check for string length before call g_convert(). it may close #962.
--- a/src/scrobbler/configure.c	Thu Jun 07 08:28:08 2007 -0700
+++ b/src/scrobbler/configure.c	Fri Jun 08 04:37:56 2007 -0700
@@ -59,7 +59,7 @@
                 bmp_cfg_db_set_string(cfgfile, "audioscrobbler", "username", (char *)uid);
                 bmp_cfg_db_set_string(cfgfile, "audioscrobbler", "ge_username", (char *)ge_uid);
 
-                if (pwd != NULL && pwd[0] != '\0')
+                if (pwd != NULL && pwd[0] != '\0' && strlen(pwd))
 		{
                         md5_init(&md5state);
                         md5_append(&md5state, (unsigned const char *)pwd, strlen(pwd));
@@ -68,7 +68,7 @@
                                         hexify((char*)md5pword, sizeof(md5pword)));
                 }
 
-                if (ge_pwd != NULL && ge_pwd[0] != '\0')
+                if (ge_pwd != NULL && ge_pwd[0] != '\0' && strlen(ge_pwd))
 		{
                         md5_init(&md5state);
                         md5_append(&md5state, (unsigned const char *)ge_pwd, strlen(ge_pwd));