<i18n dev> RFR: 8273111: Default timezone should return zone ID if /etc/localtime is valid but not canonicalization on linux [v2]
Wu Yan
wuyan at openjdk.java.net
Wed Oct 13 09:02:03 UTC 2021
On Mon, 11 Oct 2021 18:16:28 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Wu Yan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> replace realpath
>
> src/java.base/unix/native/libjava/TimeZone_md.c line 113:
>
>> 111: }
>> 112: }
>> 113:
>
> There are a few `*(right + 1)` references in the loops. Is there any possibility that it would run over the buffer?
It wouldn't run over the buffer. Here `end` points to `'\0'`. At line 94 and line 99, `right` is less than `end`, so `right + 1` is at most `end`. At line 103, if `right` equals `end`, `*right != '\0'` will be false and `!(*right == '/' && *(right + 1) == '/')` will not executed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5327
More information about the i18n-dev
mailing list