Re: Detect buffer underflow in get_th() - Mailing list pgsql-hackers

From Alexander Kuznetsov
Subject Re: Detect buffer underflow in get_th()
Date
Msg-id f2f28c76-eb34-4e0c-a5fa-f1da52918eb0@altlinux.org
Whole thread Raw
In response to Re: Detect buffer underflow in get_th()  (Peter Eisentraut <peter@eisentraut.org>)
List 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
forsuch 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




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Wrong security context for deferred triggers?
Next
From: Tom Lane
Date:
Subject: Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan