This is a discussion on Re: parameter value overflow in main.cf within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Tue, 3 Feb 2004, Marcin Gryszkalis wrote: > I noticed that postfix doesn't say a word if value ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Tue, 3 Feb 2004, Marcin Gryszkalis wrote:
> I noticed that postfix doesn't say a word if value of integer parameter > in main.cf is too big. The int variable is silently overflowed. > Additionaly - postconf shows oryginal value (the way it's saved in > config file). > Known issue, and providing sensible inputs in *configuration* files is the administrator's responsibility. Postfix is careful when processing data received from untrusted sources, but the administrator is expected to not screw up. > > It seems that > static int convert_mail_conf_int(const char *name, int *intval) > should be rewritten to check for overflows (possibly use > strtoll instead of sscanf etc.) > strtoll() is not available on some platforms supported by Postfix. Fixing this requires Postfix to use its own conversion functions or, to convert the value back to a string and compare the strings. It is apparent that the effort is justified in this case. > I'm not familiar with postfix development rules but I could make a patch. > Where should it be sent to for acceptance? > Proposed patches are posted to this list, be prepared to be held to high standard, as seen in most of the Postfix code (save perhaps a few contributed modules, which deviate somewhat from the code quality/style of the core Postfix components). This code quality is higher that most open source projects, read the code thoroughly to learn the quality and style requirements before making any changes. -- Viktor. |