dovecot-2.2: lib-storage: pop3c - fix invalid blank password check

dovecot at dovecot.org dovecot at dovecot.org
Thu May 8 14:04:53 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/1b5c6a492e3a
changeset: 17360:1b5c6a492e3a
user:      Phil Carmody <phil at dovecot.fi>
date:      Thu May 08 15:56:25 2014 +0300
description:
lib-storage: pop3c - fix invalid blank password check

The pointer will never be NULL, as it's initialised pointing to an empty
string, and can only be overridden by setting it to another string. So
the test always failed. Instead, check the 1st character of the password.

diffstat:

 src/lib-storage/index/pop3c/pop3c-storage.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 9e3e46409415 -r 1b5c6a492e3a src/lib-storage/index/pop3c/pop3c-storage.c
--- a/src/lib-storage/index/pop3c/pop3c-storage.c	Thu May 08 17:02:19 2014 +0300
+++ b/src/lib-storage/index/pop3c/pop3c-storage.c	Thu May 08 15:56:25 2014 +0300
@@ -41,7 +41,7 @@
 		*error_r = "missing pop3c_host";
 		return -1;
 	}
-	if (storage->set->pop3c_password == '\0') {
+	if (storage->set->pop3c_password[0] == '\0') {
 		*error_r = "missing pop3c_password";
 		return -1;
 	}


More information about the dovecot-cvs mailing list