Re: [PATCH] Fix buffer not null terminated on (ecpg lib) - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] Fix buffer not null terminated on (ecpg lib)
Date
Msg-id 20210615172858.wubto2e4552ughhl@alap3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] Fix buffer not null terminated on (ecpg lib)  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: [PATCH] Fix buffer not null terminated on (ecpg lib)
List pgsql-hackers
Hi,

On 2021-06-15 07:40:46 -0300, Ranier Vilela wrote:
> memcpy would not suffer from it?

It'd not be correct for short sqlstates - you'd read beyond the end of
the source buffer. There are cases of it in the ecpg code.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: unnesting multirange data types
Next
From: Tom Lane
Date:
Subject: Re: unnesting multirange data types