Re: AW: [Exim] buffer overflow?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Tim Waugh
CC: Hirling Endre, exim-users
Sujet: Re: AW: [Exim] buffer overflow?
On Mon, 18 Jun 2001, Tim Waugh wrote:

> On Mon, Jun 18, 2001 at 05:38:09PM +0200, Hirling Endre wrote:
>
> > +static char* prepared_address;
> [...]
> > +    prepared_address = (char*)malloc(hossz+1);
> [...]
> > +    return prepared_address;
> [...]

>
> Now you have a memory leak, and a missing out-of-memory check.


It's a short-lived delivery process (i.e. not the daemon process), so
memory leaks aren't an issue.

But the function is clearly a silly bit of code. I'm glad I've been able
to abolish in in Exim 4.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.