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. Tom. I agree that fixing the sprintf usage is not well-timed at the
moment, so I’ve removed that change.
Regarding the use of wcsncpy with LOCALE_NAME_MAX_LENGTH - 1, it is a
precaution in case the input string is not null-terminated.
Thanks again,
Haibo
__