]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: Fixed parsing octal numbers.
authorTimo Sirainen <tss@iki.fi>
Wed, 7 Apr 2010 07:12:09 +0000 (10:12 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 7 Apr 2010 07:12:09 +0000 (10:12 +0300)
--HG--
branch : HEAD

src/lib-settings/settings-parser.c

index fd32a05369544a4f4aaa24153ba8f9350f92c50b..2d4f640bdd0234ecab9ea708cee19241a700a197 100644 (file)
@@ -329,7 +329,7 @@ get_octal(struct setting_parser_context *ctx, const char *value,
        if (*value != '0')
                return get_uint(ctx, value, result_r);
 
-       octal = strtoull(value + 1, &p, 4);
+       octal = strtoull(value + 1, &p, 8);
        if (*p != '\0' || octal > UINT_MAX) {
                ctx->error = p_strconcat(ctx->parser_pool, "Invalid number: ",
                                         value, NULL);