ICU-23228 Fix bugs from static analyzer #3698
Open
+17
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When analyzing chromium code
During the analysis chromium code with clang-sa, cppcheck and clang-tidy, we find a number of bugs.
Fix bugs from static analyzer (first part)
icu4c/source/common/cmemory.h - "Arguments must not be overlapping buffers"
icu4c/source/i18n/dtptngen.cpp - "Arguments must not be overlapping buffers"
icu4c/source/common/normalizer2impl.cpp - "Dereference of null pointer"(icu4c/source/source/i18n/rulebasedcollator.cpp:1376)
icu4c/source/i18n/uspoof.cpp - "Dereference of null pointer"
icu4c/source/common/uresbund.cpp - "Access of the field 'fResBuf' at negative byte offset -1" when fResPathLen == 0
icu4c/source/i18n/calendar.cpp - "Division by zero" (getActualMaximum can return 0)
I can't create account in Jira for creating issue and getting number
I would be grateful if reviewers can help with creating issue for getting ticket number
Checklist