dovecot-2.2: auth: passdb/userdb dict settings file parsing didn...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 12 23:20:36 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/a07ddd1b2763
changeset: 17462:a07ddd1b2763
user: Timo Sirainen <tss at iki.fi>
date: Fri Jun 13 00:15:47 2014 +0300
description:
auth: passdb/userdb dict settings file parsing didn't handle errors correctly.
Found by Coverity
diffstat:
src/auth/db-dict.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (22 lines):
diff -r 2e239d925c09 -r a07ddd1b2763 src/auth/db-dict.c
--- a/src/auth/db-dict.c Fri Jun 13 00:09:23 2014 +0300
+++ b/src/auth/db-dict.c Fri Jun 13 00:15:47 2014 +0300
@@ -206,10 +206,14 @@
return FALSE;
}
if (strcmp(type, "key") == 0) {
- if (name == NULL)
- return "Key section is missing name";
- if (strchr(name, '.') != NULL)
- return "Key section names must not contain '.'";
+ if (name == NULL) {
+ *errormsg = "Key section is missing name";
+ return FALSE;
+ }
+ if (strchr(name, '.') != NULL) {
+ *errormsg = "Key section names must not contain '.'";
+ return FALSE;
+ }
ctx->section = DICT_SETTINGS_SECTION_KEY;
ctx->cur_key = array_append_space(&ctx->conn->set.keys);
*ctx->cur_key = default_key_settings;
More information about the dovecot-cvs
mailing list