Fwd: minor correction to deliver.c

From: Pavel Levshin (no email)
Date: Wed Aug 01 2001 - 08:25:32 EDT


Surprisingly, it still (with some corrections) applies
to the new 2.0.16.

This is a forwarded message
From: Pavel Levshin <>
To: <>
Date: Sunday, May 20, 2001, 9:05:10 PM
Subject: minor correction to deliver.c

===8<==============Original message text===============
Hello cyrus-bugs,

  I once wrote you about SIGSEGV, which takes place in deliver, while
  trying to execute it with incorrect permissions. Now I think I've
  discovered this particular problem in the source.

  In deliver.c:

    config_init("deliver");
                                                    
    deliver_in = prot_new(0, 0);
    deliver_out = prot_new(1, 1);
    prot_setflushonread(deliver_in, deliver_out);
    prot_settimeout(deliver_in, 300);

  So, if config_init failed, it will call fatal(), which makes use of
  deliver_out. One of possible solutions is simple: to place
  config_init() after deliver_out is initialized.

    deliver_in = prot_new(0, 0);
    deliver_out = prot_new(1, 1);
    prot_setflushonread(deliver_in, deliver_out);
    prot_settimeout(deliver_in, 300);
                                                    
    config_init("deliver");
                                                    
  Maybe I've missed something...

WBR, Pavel mailto: icq:52216261

===8<===========End of original message text===========








Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD