Re: may be a buffer overflow problem - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: may be a buffer overflow problem
Date
Msg-id 2D1488FA-F270-4672-A500-6EEDC4529FD5@yesql.se
Whole thread Raw
In response to Re: may be a buffer overflow problem  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re:Re: may be a buffer overflow problem
List pgsql-hackers
> On 14 Jun 2024, at 10:29, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> On Fri, 2024-06-14 at 10:10 +0200, Daniel Gustafsson wrote:
>>> On 14 Jun 2024, at 10:06, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>>
>>> So you think we should ignore that compiler warning?
>>
>> We already do using this in meson.build:
>>
>>   # Similarly disable useless truncation warnings from gcc 8+
>>   'format-truncation',
>>   'stringop-truncation',
>
> Right; and I see that -Wno-stringop-truncation is also set if you build
> with "make".  So your patch is good.

Thanks for looking!  I will apply it backpatched all the way down as this has
been wrong since 2006.

> I wonder how Winter Loo got to see that warning...

And it would be interesting to know if that was the only warning, since error.c
in ECPG performs the exact same string copy.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: may be a buffer overflow problem
Next
From: Dmitry Dolgov
Date:
Subject: Re: libpq contention due to gss even when not using gss