Mercurial > dovecot > core-2.2
changeset 19546:a52368764cfe
lib-settings: If SET_UINT_OCT has invalid value, we ignored the error and returned garbage value.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 08 Jan 2016 17:04:27 +0200 |
parents | db146dda35bc |
children | a6aa3aa7c296 |
files | src/lib-settings/settings-parser.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-settings/settings-parser.c Fri Jan 08 17:02:56 2016 +0200 +++ b/src/lib-settings/settings-parser.c Fri Jan 08 17:04:27 2016 +0200 @@ -344,6 +344,7 @@ if (str_to_ullong_oct(value, &octal) < 0) { ctx->error = p_strconcat(ctx->parser_pool, "Invalid number: ", value, NULL); + return -1; } *result_r = (unsigned int)octal; return 0;