diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-09-20 13:50:55 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-09-20 13:50:55 +0800 |
commit | 3dbae07cae6bf2e2742dcb96ef4f8b755db21874 (patch) | |
tree | b6fb7670f8a22d3a3eedf52393deadc48f6dfb95 /devel | |
parent | 7ccb81303acbdda411e241666f6a733f46d91151 (diff) | |
download | marcuscom-ports-3dbae07cae6bf2e2742dcb96ef4f8b755db21874.tar marcuscom-ports-3dbae07cae6bf2e2742dcb96ef4f8b755db21874.tar.gz marcuscom-ports-3dbae07cae6bf2e2742dcb96ef4f8b755db21874.tar.bz2 marcuscom-ports-3dbae07cae6bf2e2742dcb96ef4f8b755db21874.tar.lz marcuscom-ports-3dbae07cae6bf2e2742dcb96ef4f8b755db21874.tar.xz marcuscom-ports-3dbae07cae6bf2e2742dcb96ef4f8b755db21874.tar.zst marcuscom-ports-3dbae07cae6bf2e2742dcb96ef4f8b755db21874.zip |
Properly fix symlink resolution and a user-after-free bug.
Obtained from: GNOME CVS
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@4852 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel')
-rw-r--r-- | devel/gnome-vfs/Makefile | 4 | ||||
-rw-r--r-- | devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-uri.c | 15 | ||||
-rw-r--r-- | devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-utils.c | 43 | ||||
-rw-r--r-- | devel/gnomevfs2/Makefile | 4 | ||||
-rw-r--r-- | devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-uri.c | 15 | ||||
-rw-r--r-- | devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-utils.c | 43 |
6 files changed, 56 insertions, 68 deletions
diff --git a/devel/gnome-vfs/Makefile b/devel/gnome-vfs/Makefile index 67881a585..929615658 100644 --- a/devel/gnome-vfs/Makefile +++ b/devel/gnome-vfs/Makefile @@ -3,12 +3,12 @@ # Whom: Ade Lovett <ade@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/devel/gnomevfs2/Makefile,v 1.109 2005/09/06 17:38:36 marcus Exp $ +# $MCom: ports/devel/gnomevfs2/Makefile,v 1.110 2005/09/12 06:34:53 marcus Exp $ # PORTNAME= gnomevfs2 PORTVERSION= 2.12.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-vfs/2.12 diff --git a/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-uri.c b/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-uri.c new file mode 100644 index 000000000..12b8f06ff --- /dev/null +++ b/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-uri.c @@ -0,0 +1,15 @@ +--- libgnomevfs/gnome-vfs-uri.c.orig Tue Sep 20 01:42:29 2005 ++++ libgnomevfs/gnome-vfs-uri.c Tue Sep 20 01:48:49 2005 +@@ -844,6 +844,12 @@ make_full_uri_from_relative (const char + char *tmp = separator - 1; + if ((separator != mutable_base_uri) && (*tmp != '/')) { + *separator = '\0'; ++ } else { ++ /* Maybe there is no domain part and this is a toplevel URI's child */ ++ char *tmp2 = strstr (mutable_base_uri, ":///"); ++ if (tmp2 != NULL && tmp2 + 3 == separator) { ++ *(separator + 1) = '\0'; ++ } + } + } + } diff --git a/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-utils.c b/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-utils.c index 54a68216d..711a98502 100644 --- a/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-utils.c +++ b/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-utils.c @@ -1,5 +1,5 @@ ---- libgnomevfs/gnome-vfs-utils.c.orig Sun May 8 09:04:05 2005 -+++ libgnomevfs/gnome-vfs-utils.c Thu Aug 4 01:58:06 2005 +--- libgnomevfs/gnome-vfs-utils.c.orig Wed Jun 8 03:19:54 2005 ++++ libgnomevfs/gnome-vfs-utils.c Tue Sep 20 01:39:33 2005 @@ -839,6 +839,7 @@ gnome_vfs_icon_path_from_filename (const for (temp_paths = paths; *temp_paths != NULL; temp_paths++) { full_filename = g_build_filename (*temp_paths, @@ -8,33 +8,12 @@ "pixmaps", relative_filename, NULL); -@@ -1954,6 +1955,7 @@ _gnome_vfs_uri_resolve_all_symlinks_uri - GnomeVFSResult res; - char *p; - int n_followed_symlinks; -+ int fully_qualified = 0; - - /* Ref the original uri so we don't lose it */ - uri = gnome_vfs_uri_ref (uri); -@@ -1963,6 +1965,8 @@ _gnome_vfs_uri_resolve_all_symlinks_uri - info = gnome_vfs_file_info_new (); - - p = uri->text; -+ if (*p == GNOME_VFS_URI_PATH_CHR) -+ fully_qualified++; - n_followed_symlinks = 0; - while (*p != 0) { - while (*p == GNOME_VFS_URI_PATH_CHR) -@@ -1972,7 +1976,11 @@ _gnome_vfs_uri_resolve_all_symlinks_uri - - new_uri = gnome_vfs_uri_dup (uri); - g_free (new_uri->text); -- new_uri->text = g_strndup (uri->text, p - uri->text); -+ if (fully_qualified-- > 0) -+ new_uri->text = g_strdup_printf ("%c", -+ GNOME_VFS_URI_PATH_CHR); -+ else -+ new_uri->text = g_strndup (uri->text, p - uri->text); - - gnome_vfs_file_info_clear (info); - res = gnome_vfs_get_file_info_uri (new_uri, info, GNOME_VFS_FILE_INFO_DEFAULT); +@@ -1992,7 +2000,7 @@ _gnome_vfs_uri_resolve_all_symlinks_uri + info->symlink_name); + if (*p != 0) { + gnome_vfs_uri_unref (uri); +- uri = gnome_vfs_uri_append_path (resolved_uri, p); ++ uri = gnome_vfs_uri_append_string (resolved_uri, p); + gnome_vfs_uri_unref (resolved_uri); + } else { + gnome_vfs_uri_unref (uri); diff --git a/devel/gnomevfs2/Makefile b/devel/gnomevfs2/Makefile index 67881a585..929615658 100644 --- a/devel/gnomevfs2/Makefile +++ b/devel/gnomevfs2/Makefile @@ -3,12 +3,12 @@ # Whom: Ade Lovett <ade@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/devel/gnomevfs2/Makefile,v 1.109 2005/09/06 17:38:36 marcus Exp $ +# $MCom: ports/devel/gnomevfs2/Makefile,v 1.110 2005/09/12 06:34:53 marcus Exp $ # PORTNAME= gnomevfs2 PORTVERSION= 2.12.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-vfs/2.12 diff --git a/devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-uri.c b/devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-uri.c new file mode 100644 index 000000000..12b8f06ff --- /dev/null +++ b/devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-uri.c @@ -0,0 +1,15 @@ +--- libgnomevfs/gnome-vfs-uri.c.orig Tue Sep 20 01:42:29 2005 ++++ libgnomevfs/gnome-vfs-uri.c Tue Sep 20 01:48:49 2005 +@@ -844,6 +844,12 @@ make_full_uri_from_relative (const char + char *tmp = separator - 1; + if ((separator != mutable_base_uri) && (*tmp != '/')) { + *separator = '\0'; ++ } else { ++ /* Maybe there is no domain part and this is a toplevel URI's child */ ++ char *tmp2 = strstr (mutable_base_uri, ":///"); ++ if (tmp2 != NULL && tmp2 + 3 == separator) { ++ *(separator + 1) = '\0'; ++ } + } + } + } diff --git a/devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-utils.c b/devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-utils.c index 54a68216d..711a98502 100644 --- a/devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-utils.c +++ b/devel/gnomevfs2/files/patch-libgnomevfs_gnome-vfs-utils.c @@ -1,5 +1,5 @@ ---- libgnomevfs/gnome-vfs-utils.c.orig Sun May 8 09:04:05 2005 -+++ libgnomevfs/gnome-vfs-utils.c Thu Aug 4 01:58:06 2005 +--- libgnomevfs/gnome-vfs-utils.c.orig Wed Jun 8 03:19:54 2005 ++++ libgnomevfs/gnome-vfs-utils.c Tue Sep 20 01:39:33 2005 @@ -839,6 +839,7 @@ gnome_vfs_icon_path_from_filename (const for (temp_paths = paths; *temp_paths != NULL; temp_paths++) { full_filename = g_build_filename (*temp_paths, @@ -8,33 +8,12 @@ "pixmaps", relative_filename, NULL); -@@ -1954,6 +1955,7 @@ _gnome_vfs_uri_resolve_all_symlinks_uri - GnomeVFSResult res; - char *p; - int n_followed_symlinks; -+ int fully_qualified = 0; - - /* Ref the original uri so we don't lose it */ - uri = gnome_vfs_uri_ref (uri); -@@ -1963,6 +1965,8 @@ _gnome_vfs_uri_resolve_all_symlinks_uri - info = gnome_vfs_file_info_new (); - - p = uri->text; -+ if (*p == GNOME_VFS_URI_PATH_CHR) -+ fully_qualified++; - n_followed_symlinks = 0; - while (*p != 0) { - while (*p == GNOME_VFS_URI_PATH_CHR) -@@ -1972,7 +1976,11 @@ _gnome_vfs_uri_resolve_all_symlinks_uri - - new_uri = gnome_vfs_uri_dup (uri); - g_free (new_uri->text); -- new_uri->text = g_strndup (uri->text, p - uri->text); -+ if (fully_qualified-- > 0) -+ new_uri->text = g_strdup_printf ("%c", -+ GNOME_VFS_URI_PATH_CHR); -+ else -+ new_uri->text = g_strndup (uri->text, p - uri->text); - - gnome_vfs_file_info_clear (info); - res = gnome_vfs_get_file_info_uri (new_uri, info, GNOME_VFS_FILE_INFO_DEFAULT); +@@ -1992,7 +2000,7 @@ _gnome_vfs_uri_resolve_all_symlinks_uri + info->symlink_name); + if (*p != 0) { + gnome_vfs_uri_unref (uri); +- uri = gnome_vfs_uri_append_path (resolved_uri, p); ++ uri = gnome_vfs_uri_append_string (resolved_uri, p); + gnome_vfs_uri_unref (resolved_uri); + } else { + gnome_vfs_uri_unref (uri); |