回复: 回复: 回复: Fix potential overflow risks from wcscpy and sprintf

2025-06-16 Thread Yan Haibo
potential overflow risks from wcscpy and sprintf Yan Haibo writes: > Regarding the use of wcsncpy with LOCALE_NAME_MAX_LENGTH - 1, it is a > precaution in case the input string is not null-terminated. I don't think it's a "precaution". I think it's introducing a

Re: 回复: 回复: Fix potential overflow risks from wcscpy and sprintf

2025-06-16 Thread Tom Lane
Yan Haibo writes: > Regarding the use of wcsncpy with LOCALE_NAME_MAX_LENGTH - 1, it is a > precaution in case the input string is not null-terminated. I don't think it's a "precaution". I think it's introducing a real bug (that is, failure on a locale name of exactly the max allowed length) to

回复: Fix potential overflow risks from wcscpy and sprintf

2025-06-16 Thread Yan Haibo
@lists.postgresql.org 主题: Re: Fix potential overflow risks from wcscpy and sprintf On 06.06.25 22:50, Yan Haibo wrote: > This change stems from a recent static code analysis, which identified a > minor potential overflow issue. I would appreciate it if someone could > review the fix

回复: 回复: Fix potential overflow risks from wcscpy and sprintf

2025-06-16 Thread Yan Haibo
发件人: Tom Lane 发送时间: 2025年6月16日 11:28 收件人: Yan Haibo 抄送: Peter Eisentraut ; pgsql-hackers@lists.postgresql.org 主题: Re: 回复: Fix potential overflow risks from wcscpy and sprintf Yan Haibo writes: > Thank you. Peter. It seems the patch may have been lost during our earlier > communicati

Re: 回复: Fix potential overflow risks from wcscpy and sprintf

2025-06-16 Thread Tom Lane
Yan Haibo writes: > Thank you. Peter. It seems the patch may have been lost during our earlier > communication, so I¡¯ve reattached it here. > I hope it comes through correctly this time. Thanks for the patch. Using wcsncpy in search_locale_enum() seems fine, assuming it exists on Windows (note

回复: Fix potential overflow risks from wcscpy and sprintf

2025-06-16 Thread Yan Haibo
@lists.postgresql.org 主题: Re: Fix potential overflow risks from wcscpy and sprintf On 06.06.25 22:50, Yan Haibo wrote: > This change stems from a recent static code analysis, which identified a > minor potential overflow issue. I would appreciate it if someone could > review the fix

Re: Fix potential overflow risks from wcscpy and sprintf

2025-06-11 Thread Peter Eisentraut
On 06.06.25 22:50, Yan Haibo wrote: This change stems from a recent static code analysis, which identified a minor potential overflow issue. I would appreciate it if someone could review the fix at their convenience. Please provide more detail in each case what the issue is and how you are pr

Fix potential overflow risks from wcscpy and sprintf

2025-06-10 Thread Yan Haibo
This change stems from a recent static code analysis, which identified a minor potential overflow issue. I would appreciate it if someone could review the fix at their convenience. Thank you for your time and support. Best regards, Haibo 0001-Mitigate-potential-overflow-risks-from-wcscpy-and-s