diff options
author | marcus <marcus@FreeBSD.org> | 2006-02-20 06:12:27 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2006-02-20 06:12:27 +0800 |
commit | 70739701c64a5357965baeed66157ab3d3a287c9 (patch) | |
tree | 9e7499c58369f9b9ef648883299c2bcf324544d0 /databases/evolution-data-server | |
parent | ba52c4309efd860c0287cdd2b38c89d4c118936e (diff) | |
download | freebsd-ports-gnome-70739701c64a5357965baeed66157ab3d3a287c9.tar.gz freebsd-ports-gnome-70739701c64a5357965baeed66157ab3d3a287c9.tar.zst freebsd-ports-gnome-70739701c64a5357965baeed66157ab3d3a287c9.zip |
Fix e-d-s so that it does not try to allocate all available memory on 64-bit
platforms. The fix committed is different from that in the PR since the
purpose of this memory was not clarified by the Evolution developers. The
fix committed casts the require memory size to an unsigned 32-bit integer.
Since the memory required should never exceed the maximum capacity of an
uint32_t, this is not a problem.
Thanks to anholt for tracking down this problem.
See http://bugzilla.gnome.org/show_bug.cgi?id=331099 for more details.
PR: 93215
Diffstat (limited to 'databases/evolution-data-server')
-rw-r--r-- | databases/evolution-data-server/Makefile | 2 | ||||
-rw-r--r-- | databases/evolution-data-server/files/patch-camel_camel-object.c | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/databases/evolution-data-server/Makefile b/databases/evolution-data-server/Makefile index 61a5f60b8e81..fa1d6732c19a 100644 --- a/databases/evolution-data-server/Makefile +++ b/databases/evolution-data-server/Makefile @@ -8,7 +8,7 @@ PORTNAME= evolution-data-server PORTVERSION= 1.4.2.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/1.4 diff --git a/databases/evolution-data-server/files/patch-camel_camel-object.c b/databases/evolution-data-server/files/patch-camel_camel-object.c new file mode 100644 index 000000000000..4eae9243f4bd --- /dev/null +++ b/databases/evolution-data-server/files/patch-camel_camel-object.c @@ -0,0 +1,22 @@ +--- camel-object.c.orig Sun Feb 19 17:04:42 2006 ++++ camel-object.c Sun Feb 19 17:06:06 2006 +@@ -454,7 +454,7 @@ cobject_state_read(CamelObject *obj, FIL + } + + /* we batch up the properties and set them in one go */ +- if (!(argv = g_try_malloc (sizeof (*argv) + (count - CAMEL_ARGV_MAX) * sizeof (argv->argv[0])))) ++ if (!(argv = g_try_malloc ((guint32) (sizeof (*argv) + (count - CAMEL_ARGV_MAX) * sizeof (argv->argv[0]))))) + return -1; + + argv->argc = 0; +@@ -534,8 +534,8 @@ cobject_state_write(CamelObject *obj, FI + + count = g_slist_length(props); + +- arggetv = g_malloc0(sizeof(*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof(arggetv->argv[0])); +- argv = g_malloc0(sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0])); ++ arggetv = g_malloc0((guint32) (sizeof(*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof(arggetv->argv[0]))); ++ argv = g_malloc0((guint32) (sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0]))); + l = props; + i = 0; + while (l) { |