Re: @(#)Mordred Labs advisory 0x0004: Multiple buffer overflows in PostgreSQL. (fwd) - Mailing list pgsql-hackers

From Neil Conway
Subject Re: @(#)Mordred Labs advisory 0x0004: Multiple buffer overflows in PostgreSQL. (fwd)
Date
Msg-id 871y8tb5m0.fsf@mailbox.samurai.com
Whole thread Raw
In response to @(#)Mordred Labs advisory 0x0004: Multiple buffer overflows in PostgreSQL. (fwd)  (Vince Vielhaber <vev@michvhf.com>)
Responses Re: @(#)Mordred Labs advisory 0x0004: Multiple buffer  (Vince Vielhaber <vev@michvhf.com>)
Re: @(#)Mordred Labs advisory 0x0004: Multiple buffer overflows  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: @(#)Mordred Labs advisory 0x0004: Multiple buffer overflows  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Vince Vielhaber <vev@michvhf.com> writes:
> And another one.

This patch should fix the problem. Doesn't include my previous patch
for repeat(). Again, somewhat off-the-cuff, so I might have missed
something...

test=# select lpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
ERROR:  Requested length too large
test=# select rpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
ERROR:  Requested length too large

(That's on a Unicode DB, haven't tested other encodings but AFAICT
this fix should still work.)

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

Attachment

pgsql-hackers by date:

Previous
From: Frank Wiles
Date:
Subject: Re: @(#)Mordred Labs advisory 0x0004: Multiple buffer overflows inPostgreSQL. (fwd)
Next
From: Bruce Momjian
Date:
Subject: Re: @(#)Mordred Labs advisory 0x0003: Buffer overflow in