Bug#285726: gnome-vfs2: libhttp.so module causes instant crash on 64-bit machines

David Mosberger-Tang David Mosberger-Tang <David.Mosberger@acm.org>, 285726@bugs.debian.org
Tue, 14 Dec 2004 21:12:47 -0800


Package: gnome-vfs2
Severity: normal
Tags: patch


It's very annoying when bug-buddy itself crashes.  At the moment, this
is what happens on any 64-bit machine because the libhttp module has
some 64-bit cleanliness issues.  In particular, there are two files
which call stpcpy().  Since the files are compiled without
-D_GNU_SOURCE, the routine ends up getting declared implicitly as
returning "int", which is deadly on 64-bit platforms.

The patch below is one way to fix the problem.  Another solution would
be to add -D_GNU_SOURCE to CPPFLAGS.  Either way is fine with me, as
long as the package gets fixed... ;-)

Thanks!

	--david

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: ia64
Kernel: Linux 2.6.10-rc2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

---
diff -urN -x '*.lo' -x '*.la' -x .deps -x .libs gnome-vfs2-2.8.3-orig/imported/neon/ne_session.c gnome-vfs2-2.8.3/imported/neon/ne_session.c
--- gnome-vfs2-2.8.3-orig/imported/neon/ne_session.c	2004-07-02 07:52:12.000000000 -0700
+++ gnome-vfs2-2.8.3/imported/neon/ne_session.c	2004-12-14 20:54:54.744379416 -0800
@@ -23,6 +23,7 @@
 
 #include "config.h"
 
+#define _GNU_SOURCE
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
diff -urN -x '*.lo' -x '*.la' -x .deps -x .libs gnome-vfs2-2.8.3-orig/imported/neon/ne_string.c gnome-vfs2-2.8.3/imported/neon/ne_string.c
--- gnome-vfs2-2.8.3-orig/imported/neon/ne_string.c	2004-07-24 07:39:43.000000000 -0700
+++ gnome-vfs2-2.8.3/imported/neon/ne_string.c	2004-12-14 20:57:11.293999272 -0800
@@ -21,6 +21,7 @@
 
 #include "config.h"
 
+#define _GNU_SOURCE
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif