Re: Fixes bug in strlower_libc_sb()

2025-11-26 Thread Bertrand Drouvot
Hi, On Tue, Nov 25, 2025 at 01:50:42PM +0800, Chao Li wrote: > On Tue, Nov 25, 2025 at 11:03 AM Chao Li wrote: > > > Hi Hackers, > > > > While reviewing Jeff's patch [1], I found this bug in strlower_libc_sb(): > > > > ``` > > static size_t > > strlower_libc_sb(char *dest, size_t destsize, const

Re: Fixes bug in strlower_libc_sb()

2025-11-24 Thread Chao Li
On Tue, Nov 25, 2025 at 11:03 AM Chao Li wrote: > Hi Hackers, > > While reviewing Jeff's patch [1], I found this bug in strlower_libc_sb(): > > ``` > static size_t > strlower_libc_sb(char *dest, size_t destsize, const char *src, ssize_t > srclen, > pg_locale_t locale) > { > if (srclen < 0) > srcl

Fixes bug in strlower_libc_sb()

2025-11-24 Thread Chao Li
Hi Hackers, While reviewing Jeff's patch [1], I found this bug in strlower_libc_sb(): ``` static size_t strlower_libc_sb(char *dest, size_t destsize, const char *src, ssize_t srclen, pg_locale_t locale) { if (srclen < 0) srclen = strlen(src); if (srclen + 1 <= destsize) { locale_t loc = locale->