Re: [Exim] Re: [SA-exim] local_scan is crashing (log_write c…

Góra strony
Delete this message
Reply to this message
Autor: Brian Kendig
Data:  
Dla: Adam D. Barratt
CC: Marc MERLIN, Exim-users, Philip Hazel
Temat: Re: [Exim] Re: [SA-exim] local_scan is crashing (log_write crash)
On May 20, 2004, at 2:11 PM, Adam D. Barratt wrote:
> Yep, that's what I thought the problem was. The assumption that a file
> offset will fit in 32 bits breaks on a number of systems, including
> BSDs
> and (as you've spotted) OS X.
>
> Changing the offending code to the following should fix the problem:
>
> log_write(0, LOG_MAIN, "SA: Action: check skipped due to message size
> (%.0f bytes) and SATruncBodyCond expanded to false (Message-Id: %s).
> %s", fdsize-18, safemesgid, mailinfo);
>
> with similar replacements for any other occasions on which
> printf(off_t)
> occurs.


That did the trick, thank you very much! I changed this line, as well
as two debug lines I found which try to print fdsize-18.

I'm not sure why the log message now says "message size (0 bytes)"
instead of giving the proper length of the message, but it doesn't
crash, so I'm not complaining.

Why does this fix work? I figure "%.0f" means a floating-point value
with no decimal places, but why does displaying the number as a float
instead of a decimal solve the problem?

- B