procmail
[Top] [All Lists]

Re: This tiny script causes a segmentation fault..

2004-07-29 16:13:57
On Wed, Jul 28, 2004 at 08:34:50PM -0600, Justin Gombos wrote:

* Dallman Ross <dman(_at_)nomotek(_dot_)com> [2004-07-28 15:38]:

I am unable to reproduce your results.  In fact, the above 
recipe in my test harness (from your LINEBUF assignment on)
does not overrun for me.

I wonder if your test harness changed something.  The script I posted
can be run by itself.

I just tried running it by itself.  It did not seem to crash
or do anything wrong.  The recipe you posted did not exceed te
LINEBUF until I padded it significantly.  (Oh: pardon my
slip in the last post, writing FILEBUF for LINEBUF or something.)

Here is the file I used:
---------------
MAILDIR=./
DEFAULT=$MAILDIR/default_box
LOGFILE=$MAILDIR/procmail.log
VERBOSE=1

DUMMY=`:>$LOGFILE`

LINEBUF=128

SOME_BYTES=(\
0000000000|\
00000000000000000000|\
11111111111111111111|\
11111111111111111111|\
11111111111111111111|\
22222222222222222222)

:0 :
*$ !^TO_$SOME_BYTES
mailbox
----------------

If I remove one 0 from SOME_BYTES, I get no overrun and a save
to mailbox.  No corruption.  If I leave the SOME_BYTES as above,
I get a log entry mentioning the overrun and a save to
$DEFAULT.

In short, I don't find a problem.  I tried both with and without
the -m flag running procmail.  The SOME_BYTES length acted the
same in either case.  I also tried /usr/local/bin/procmail
here, which is 3.22; and my own procmail, which has been modified.
No difference in behavior.


If you feel like it, you could download my diagnostics plug-in rc
and run it via an INCLUDERC after the buffer overrun.  You will get
something like this:

I'm not sure yet if I want to start looking at the code to debug it.
I'll keep that in mind.

I have no desire to look at C-code.  That's not what I was suggesting.
My file is simply a procmail rc-file.  You grab it, and put a line
in your current rc right below the area you think is causing the
problem:

  INCLUDERC=vsnag.self-test.rc

Then you look in your log.  That is all.  Knowing what all the possible
procmail vars have resolved to is useful to know.

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>