summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-09-19 14:09:44 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-09-19 14:09:44 +0800
commitc4c4e9878812f4ce09ea47c7b56adc0e6f3dd933 (patch)
treeebca519abc4c9f87b25f6ce89a01a67d639e5a59
parentd72a649d5109055d2d8fc5b2d58c54e916b29155 (diff)
downloadmarcuscom-ports-c4c4e9878812f4ce09ea47c7b56adc0e6f3dd933.tar
marcuscom-ports-c4c4e9878812f4ce09ea47c7b56adc0e6f3dd933.tar.gz
marcuscom-ports-c4c4e9878812f4ce09ea47c7b56adc0e6f3dd933.tar.bz2
marcuscom-ports-c4c4e9878812f4ce09ea47c7b56adc0e6f3dd933.tar.lz
marcuscom-ports-c4c4e9878812f4ce09ea47c7b56adc0e6f3dd933.tar.xz
marcuscom-ports-c4c4e9878812f4ce09ea47c7b56adc0e6f3dd933.tar.zst
marcuscom-ports-c4c4e9878812f4ce09ea47c7b56adc0e6f3dd933.zip
Fix a use-after-free problem in the Fuse code.
PR: 138330 git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@12900 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--sysutils/hal/Makefile4
-rw-r--r--sysutils/hal/files/patch-hald_freebsd_hf-volume.c15
2 files changed, 11 insertions, 8 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile
index 885a9e509..5a55e8041 100644
--- a/sysutils/hal/Makefile
+++ b/sysutils/hal/Makefile
@@ -3,12 +3,12 @@
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/sysutils/hal/Makefile,v 1.63 2009/09/14 04:34:35 marcus Exp $
+# $MCom: ports/sysutils/hal/Makefile,v 1.64 2009/09/18 05:47:01 marcus Exp $
#
PORTNAME= hal
DISTVERSION= 0.5.13
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/
diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-volume.c b/sysutils/hal/files/patch-hald_freebsd_hf-volume.c
index 039a1a676..6ee93b139 100644
--- a/sysutils/hal/files/patch-hald_freebsd_hf-volume.c
+++ b/sysutils/hal/files/patch-hald_freebsd_hf-volume.c
@@ -1,5 +1,5 @@
---- hald/freebsd/hf-volume.c.orig 2008-05-07 19:24:03.000000000 -0400
-+++ hald/freebsd/hf-volume.c 2008-10-26 15:17:09.000000000 -0400
+--- hald/freebsd/hf-volume.c.orig 2008-08-10 09:50:10.000000000 -0400
++++ hald/freebsd/hf-volume.c 2009-09-19 02:06:37.000000000 -0400
@@ -45,6 +45,7 @@
#include "hf-util.h"
@@ -8,7 +8,7 @@
static void
hf_volume_get_mounts (struct statfs **mounts, int *n_mounts)
-@@ -60,6 +61,55 @@ hf_volume_get_mounts (struct statfs **mo
+@@ -60,6 +61,58 @@ hf_volume_get_mounts (struct statfs **mo
}
}
@@ -37,9 +37,12 @@
+ {
+ if (strcmp(fields[0], special) == 0)
+ {
++ char *ret;
++
++ ret = g_strdup(fields[1]);
+ g_strfreev(fields);
+ g_strfreev(lines);
-+ return g_strdup(fields[1]);
++ return ret;
+ }
+ }
+ g_strfreev(fields);
@@ -64,7 +67,7 @@
static const struct statfs *
hf_volume_mounts_find (const struct statfs *mounts,
int n_mounts,
-@@ -71,8 +121,18 @@ hf_volume_mounts_find (const struct stat
+@@ -71,8 +124,18 @@ hf_volume_mounts_find (const struct stat
g_return_val_if_fail(special != NULL, NULL);
for (i = 0; i < n_mounts; i++)
@@ -85,7 +88,7 @@
return NULL;
}
-@@ -92,7 +152,13 @@ hf_volume_device_update_mount_properties
+@@ -92,7 +155,13 @@ hf_volume_device_update_mount_properties
special = hal_device_property_get_string(device, "block.device");
if (special)