Re: Detect buffer underflow in get_th()

2024-12-13 Thread Alexander Kuznetsov
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

Re: Detect buffer underflow in get_th()

2024-09-24 Thread Alexander Kuznetsov
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-

Re: Detect buffer underflow in get_th()

2024-07-24 Thread 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

Re: Detect buffer underflow in get_th()

2024-07-24 Thread Peter Eisentraut
On 24.07.24 11:43, Alexander Kuznetsov wrote: Hello everyone, In src/backend/utils/adt/formatting.c:1516, there is a get_th() function utilized to return ST/ND/RD/TH suffixes for simple numbers. Upon reviewing its behavior, it appears capable of receiving non-numeric inputs (this is verified b

Detect buffer underflow in get_th()

2024-07-24 Thread Alexander Kuznetsov
Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Wed, 24 Jul 2024 12:31:45 +0300 Subject: [PATCH] Detect buffer underflow in get_th() If get_th() can receive input that is not a number, then it can also receive empty input. Empty input with zero length can result in a buffer underflow when