[gnome-vfs] Don't crash if we get a NULL symlink



commit 92869585b2e9ab4e262f1d6b7592fe7e2c3fb327
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Mar 10 11:23:24 2010 +0100

    Don't crash if we get a NULL symlink
    
    Patch from debian/ubuntu:
    http://launchpadlibrarian.net/35571673/gnome-vfs_2.24.2-1ubuntu2.debdiff

 modules/ftp-method.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/modules/ftp-method.c b/modules/ftp-method.c
index c40c323..ac02b56 100644
--- a/modules/ftp-method.c
+++ b/modules/ftp-method.c
@@ -2678,7 +2678,12 @@ do_read_directory (GnomeVFSMethod *method,
 					res = GNOME_VFS_ERROR_TOO_MANY_LINKS;
 					break;
 				}
-				
+
+				if (symlink_info->symlink_name == NULL) {
+					res = GNOME_VFS_ERROR_BAD_PARAMETERS;
+					break;
+				}
+
 				symlink_name = gnome_vfs_escape_path_string (symlink_info->symlink_name);
 				gnome_vfs_file_info_clear (symlink_info);
 				



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]