Re: Detect buffer underflow in get_th()

From: Alexander Kuznetsov <kuznetsovam(at)altlinux(dot)org>
To: Peter Eisentraut <peter(at)eisentraut(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: 2024-07-24 15:53:53
Message-ID: f2f28c76-eb34-4e0c-a5fa-f1da52918eb0@altlinux.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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.

--
Best regards,
Alexander Kuznetsov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-07-24 16:07:06 Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan
Previous Message Pavel Stehule 2024-07-24 15:52:49 Re: Wrong security context for deferred triggers?