postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: Overflow check when reading integer values fr

Re: Overflow check when reading integer values from config?

From: Wietse Venema <wietse_at_nospam>
Date: Mon Oct 11 2010 - 16:55:34 GMT
To: Miroslav Lichvar <>

Miroslav Lichvar:
> Hi,
> there is an inconsistency between 64-bit and 32-bit systems when a
> large integer which doesn't fit in int is specified in the config. On
> 32-bit the value is clamped to INT_MAX, because long is the same width
> as int. This leads to strange situations when the same configuration
> works on 32-bit, but fails on 64-bit, as I have seen in a recent
> Fedora bug report with too large mailbox_size_limit.

Unfortunately, sccanf() returns no error indication when input
conversion fails - it was broken by design.

Eventually, all numerical conversions will need to be "ported" over
the strtol() family.