aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorjylefort <jylefort@FreeBSD.org>2006-10-06 00:14:14 +0800
committerjylefort <jylefort@FreeBSD.org>2006-10-06 00:14:14 +0800
commit1a24ff7d6f1934f3781af1b9fa274e93cdf46043 (patch)
treeeb45c58fc6c0bfa2a1a9d1638fe6f54a7754aaa4 /devel
parentc5abcbb24d11b391f5889c84a5c846ad6816495a (diff)
downloadfreebsd-ports-gnome-1a24ff7d6f1934f3781af1b9fa274e93cdf46043.tar.gz
freebsd-ports-gnome-1a24ff7d6f1934f3781af1b9fa274e93cdf46043.tar.zst
freebsd-ports-gnome-1a24ff7d6f1934f3781af1b9fa274e93cdf46043.zip
- Remove the ICU crash workaround and really fix the issue. If
resultLength is smaller than the length needed to store the collation key, ucol_getSortKey() sometimes does not obey resultLength and overflows the result buffer... - Plug a memory leak in the icu patch.
Diffstat (limited to 'devel')
-rw-r--r--devel/glib20/Makefile1
-rw-r--r--devel/glib20/files/extra-patch-glib_gunicollate.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile
index 5e8e6925d304..78d103c31f24 100644
--- a/devel/glib20/Makefile
+++ b/devel/glib20/Makefile
@@ -54,7 +54,6 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gthread_gthread-posix.c
LIB_DEPENDS+= icui18n:${PORTSDIR}/devel/icu
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-glib_Makefile.in \
${FILESDIR}/extra-patch-glib_gunicollate.c
-CFLAGS+= -O0 # avoid an icu crash in the gimp
.endif
post-patch:
diff --git a/devel/glib20/files/extra-patch-glib_gunicollate.c b/devel/glib20/files/extra-patch-glib_gunicollate.c
index 0ce4dbde855c..5d31cbd2ed72 100644
--- a/devel/glib20/files/extra-patch-glib_gunicollate.c
+++ b/devel/glib20/files/extra-patch-glib_gunicollate.c
@@ -1,5 +1,5 @@
--- glib/gunicollate.c.orig Sun Nov 27 21:15:41 2005
-+++ glib/gunicollate.c Wed Jul 19 01:06:32 2006
++++ glib/gunicollate.c Thu Oct 5 17:11:44 2006
@@ -26,10 +26,57 @@
#include <wchar.h>
#endif
@@ -99,14 +99,14 @@
+ UChar *wstr = utf8_to_uchar(str, len, &wstr_len);
+ if (wstr != NULL)
+ {
-+ uint8_t dummy;
+ int32_t result_len;
+
+ /* get size of result */
-+ result_len = ucol_getSortKey(icu_collator, wstr, wstr_len, &dummy, 1);
++ result_len = ucol_getSortKey(icu_collator, wstr, wstr_len, NULL, 0);
+
+ result = g_new(char, result_len);
+ ucol_getSortKey(icu_collator, wstr, wstr_len, result, result_len);
++ g_free(wstr);
+
+ return result;
+ }