Repository navigation
ICU-21118 check that dst and src are not null in uprv_memcpy - #1489
Conversation
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
jefgen
left a comment
There was a problem hiding this comment.
Thanks Erik! A few minor nits... :)
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
jefgen
left a comment
There was a problem hiding this comment.
lgtm, but please wait for Markus to review as well. Thanks!
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
|
I checked release 68.2 but I didn't find this fix among the JIRAs. which release would contain this fix ? If none, when would the next release be made ? thanks |
This PR was merged after the 68.2 release, so this change wouldn't be included as part of it. |
|
Thanks for the response. I will watch for the next release. |
|
FWIW, you could possibly consider cherry-picking this change onto The change in |
|
Assuming 68.3 release would come sooner than 69.1, it is nice to cherry-pick the fix. We have been experiencing the issue (using 67.1) for quite a while. Thanks |
This change cherry-picks two tickets from the upstream ICU repo that were merged after the ICU 68.2 release. - ICU-21427 Don't ignore already checked-in files under "tools/cldr/lib" - ICU-21118 check that dst and src are not null in uprv_memcpy The first one I had already done with #52, so this is mostly just making an update for the comments and to record it in the `changelog.md` file. The second one was fixed by @erik0686, and prevents undefined behavior in `ultag_parse`. CP: ICU-21118 check that dst and src are not null in uprv_memcpy https://unicode-org.atlassian.net/browse/ICU-21118 unicode-org/icu#1489 CP: ICU-21427 Don't ignore already checked-in files under "tools/cldr/lib" https://unicode-org.atlassian.net/browse/ICU-21427 unicode-org/icu#1500 Update changelog.md for cherry-picked tickets.
It was pointed out that uprv_memcpy() and uprv_memmove() internally use memcpy and memmove respectively, and these do not allow dst or src to be null. In this PR, I am adding a check for Debug mode for these two functions to make sure that doesn't happen.
After building ICU on Linux there was a case where adding this check could bring errors on the tests, so I am adding a check to uloc_tag.cpp as well.
After this, I built again on Linux and Windows and found no more issues. And all tests pass successfully :D
Checklist