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
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
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.
Best regards,
Haibo
发件人: Peter Eisentraut
发送时间: 2025年6月11日 00:43
收件人: Yan Haibo ; pgsql-hackers@list
发件人: 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
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
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.
Best regards,
Haibo
发件人: Peter Eisentraut
发送时间: 2025年6月11日 00:43
收件人: Yan Haibo ; pgsql-hackers@lis