blob: e9978aba7a8e37c42992abd61248713110a23b3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
--- 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);
}
--- icu/source/common/ubidi.c.orig 2014-08-29 14:32:24.007259924 +0100
+++ icu/source/common/ubidi.c 2014-08-29 14:33:21.555833532 +0100
@@ -2521,11 +2521,18 @@
pBiDi->trailingWSStart=saveTrailingWSStart;
/* free memory for mapping table and visual text */
uprv_free(runsOnlyMemory);
+ runsOnlyMemory=NULL;
if(pBiDi->runCount>1) {
pBiDi->direction=UBIDI_MIXED;
}
cleanup3:
- pBiDi->reorderingMode=UBIDI_REORDER_RUNS_ONLY;
+ if(runsOnlyMemory != NULL)
+ {
+ pBiDi->reorderingMode=UBIDI_REORDER_RUNS_ONLY;
+ uprv_free(runsOnlyMemory);
+ }
+ else
+ pBiDi->reorderingMode=UBIDI_REORDER_RUNS_ONLY;
}
/* ubidi_setPara ------------------------------------------------------------ */
|