Re: may be a buffer overflow problem

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Winter Loo <winterloo(at)126(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: may be a buffer overflow problem
Date: 2024-06-14 08:39:12
Message-ID: 2D1488FA-F270-4672-A500-6EEDC4529FD5@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 14 Jun 2024, at 10:29, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Fri, 2024-06-14 at 10:10 +0200, Daniel Gustafsson wrote:
>>> On 14 Jun 2024, at 10:06, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2024-06-14 08:46:04 Re: libpq contention due to gss even when not using gss
Previous Message Laurenz Albe 2024-06-14 08:29:31 Re: may be a buffer overflow problem