Re: Detect buffer underflow in get_th()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: kuznetsovam(at)altlinux(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: nickel(at)altlinux(dot)org, egori(at)altlinux(dot)org
Subject: Re: Detect buffer underflow in get_th()
Date: 2025-08-18 09:16:28
Message-ID: f9b9fdc7-4131-4722-ae6b-7ab4fc1f6ead@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13.12.24 09:57, Alexander Kuznetsov wrote:
> Hello, ping?
>
> 24.09.2024 17:52, Alexander Kuznetsov wrote:
>> Hello,
>>
>> is there anything else we can help with or discuss in order to apply
>> this fix?
>>
>> 24.07.2024 18:53, Alexander Kuznetsov пишет:
>>>
>>> 24.07.2024 18:39, Peter Eisentraut wrote:
>>>> If it can't happen in practice, maybe an assertion would be enough?
>>>>
>>>
>>> In practice, the function should not receive non-numeric strings
>>> either; however, since there is an exception in place for such cases,
>>> I thought it would be good to add a check for zero-length input in a
>>> similar manner.
>>>
>>> But of course it's open for discussion and team decision whether this
>>> should be addressed as an assertion or handled differently.

After some further (internal) consultations, I have committed your fix
as an assertion. Thanks.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-08-18 09:27:05 Re: Raw parse tree is not dumped to log
Previous Message Michael Paquier 2025-08-18 09:15:22 Re: test_ddl_deparse: Rename test create_sequence_1