Re: @(#)Mordred Labs advisory 0x0003: Buffer overflow in PostgreSQL (fwd) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: @(#)Mordred Labs advisory 0x0003: Buffer overflow in PostgreSQL (fwd)
Date
Msg-id 2376.1029874501@sss.pgh.pa.us
Whole thread Raw
In response to Re: @(#)Mordred Labs advisory 0x0003: Buffer overflow in  (Vince Vielhaber <vev@michvhf.com>)
List pgsql-hackers
Vince Vielhaber <vev@michvhf.com> writes:
> Where do we check that this:
>         result = (text *) palloc(tlen);
> is even successful?

palloc elogs if it can't allocate the space; it's unlike malloc in that
respect.  I believe it also has a guard to reject requests > 1Gb, so
I think it's reasonably proof against internal arithmetic overflows.

This problem is strictly repeat's error, not palloc's.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: @(#)Mordred Labs advisory 0x0003: Buffer overflow in
Next
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in