summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Perier <mrpouet@gentoo.org>2009-07-04 13:41:43 +0000
committerRomain Perier <mrpouet@gentoo.org>2009-07-04 13:41:43 +0000
commit83531d14f7bb999cbf51ca1181d7a27869e3aee8 (patch)
treef615e59b26267570547fa5e92673d7326ccee346 /net-ftp/gftp/files
parentMarking audacity-1.3.7 ppc64 for bug 273094 (diff)
downloadhistorical-83531d14f7bb999cbf51ca1181d7a27869e3aee8.tar.gz
historical-83531d14f7bb999cbf51ca1181d7a27869e3aee8.tar.bz2
historical-83531d14f7bb999cbf51ca1181d7a27869e3aee8.zip
Fix SIGSEGV for gftp_expand_path function
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'net-ftp/gftp/files')
-rw-r--r--net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch b/net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch
new file mode 100644
index 000000000000..f3e029dea0ca
--- /dev/null
+++ b/net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch
@@ -0,0 +1,21 @@
+Fix segmentation fault, when gftpui_run_chdir is called with directory=0x0,
+and then calls gftp_expand_path (src=0x0),
+the NULL string was cloned using g_strdup, which returns NULL if
+its only argument is NULL, then this returned string was unreferenced.
+
+ lib/misc.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/lib/misc.c b/lib/misc.c
+index 16c019b..2791466 100644
+--- a/lib/misc.c
++++ b/lib/misc.c
+@@ -143,6 +143,8 @@ gftp_expand_path (gftp_request * request, const char *src)
+ tempchar;
+ struct passwd *pw;
+
++ g_return_val_if_fail(src != NULL, NULL);
++
+ pw = NULL;
+ str = g_strdup (src);
+