[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in sm truncates messages on AIX (New bug)
>
> OS: AIX 4.1.5
> zmailer version: 2.99.48 patch1 added.
>
> description:
> A bug in sm cleares some message bodies to size zero.
>
> detail:
> In sm.c appendlet():
>
> /* we are assumed to be positioned properly at start of message body */
>
> This is not always true. In certain cases (I've been able to reproduce but
> haven't checked the cause) mfd is positioned way outside the file's range.
> When this happens no body can be read and thus no body written to the delivery
> agent either.
Right. Now I have replaced it with:
/* We make sure we are positioned properly ... */
(and doing lseek())
> Kludge:
>
> Check that mfd file position equals dp->msgbodyoffset, if not make new
> lseek with dp->msgbodyoffset and SEEK_SET:
With that you do two lseek() calls -- the first to find out
where the IO cursor is, and the second to set it...
It is easier just to set it.
....
> --
> E-Mail: Martin.Wendel@ITS.UU.SE Snail-Mail: ITS
/Matti Aarnio <mea@nic.funet.fi>