diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-29 09:21:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-29 09:27:38 +0100 |
commit | f3cbb539e5d8e042432ab2ee9c90a3ad8c9ade5a (patch) | |
tree | a8da8e255361a3a7ad6e52ef5a863acdc4bf2feb /external/icu | |
parent | fdo#83044:Fix for corruption of file with SDT content. (diff) | |
download | core-f3cbb539e5d8e042432ab2ee9c90a3ad8c9ade5a.tar.gz core-f3cbb539e5d8e042432ab2ee9c90a3ad8c9ade5a.zip |
icu#11131 coverity warnings
Change-Id: I67d0b4b0c39c62646c7a0ae7152c7ca256680c38
Diffstat (limited to 'external/icu')
-rw-r--r-- | external/icu/UnpackedTarball_icu.mk | 1 | ||||
-rw-r--r-- | external/icu/icu4c-icu11131.patch.1 | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk index 3f9eda26c3a1..0f6ecd1fac13 100644 --- a/external/icu/UnpackedTarball_icu.mk +++ b/external/icu/UnpackedTarball_icu.mk @@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu-ubsan.patch.0 \ external/icu/icu4c-icu11054.patch.1 \ external/icu/icu4c-icu11100.patch.1 \ + external/icu/icu4c-icu11131.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/icu/icu4c-icu11131.patch.1 b/external/icu/icu4c-icu11131.patch.1 new file mode 100644 index 000000000000..58364b026b42 --- /dev/null +++ b/external/icu/icu4c-icu11131.patch.1 @@ -0,0 +1,46 @@ +--- icu/source/i18n/smpdtfmt.cpp.orig 2014-08-27 10:29:29.849821672 +0530 ++++ icu/source/i18n/smpdtfmt.cpp 2014-08-27 10:29:49.323821401 +0530 +@@ -1082,6 +1082,7 @@ + } + } else { + status = U_MEMORY_ALLOCATION_ERROR; ++ return; + } + } + umtx_unlock(&LOCK); +--- icu/source/common/usprep.cpp.orig 2014-08-27 10:38:24.360821077 +0530 ++++ icu/source/common/usprep.cpp 2014-08-27 10:38:38.696821312 +0530 +@@ -796,16 +796,23 @@ usprep_prepare( const UStringPrepProfi + } + + CLEANUP: +- if(b1!=b1Stack){ +- uprv_free(b1); +- b1=NULL; +- } +- +- if(b2!=b1Stack && b2!=b2Stack && b2!=b1 /* b1 should not be freed twice */){ +- uprv_free(b2); +- b2=NULL; +- } +- return u_terminateUChars(dest, destCapacity, b2Len, status); ++ if(b2==b1 && b1!=b1Stack){ ++ uprv_free(b1); ++ b1=NULL; ++ b2=NULL; ++ } ++ else ++ { ++ if(b1!=b1Stack){ ++ uprv_free(b1); ++ b1=NULL; ++ } ++ if(b2!=b1Stack && b2!=b2Stack && b2!=b1 /* b1 should not be freed twice */){ ++ uprv_free(b2); ++ b2=NULL; ++ } ++ } ++ return u_terminateUChars(dest, destCapacity, b2Len, status); + } + + |