Hi!

I've applied the patch and verified the fix with a testcase.  I'll be
uploading this patched version as an NMU.

I'm attaching the interdiff of the changes made. It's just the patch, the
changelog, and the line in debian/rules that includes the patch.

By the way, the package uses a very convulted way of applying the patches,
which took me a while to figure out.  It'd be nice if it used some more
standard way.

Grüße.

-- 
 Besos,
     Maggie.

diff -u doxygen-1.5.8/debian/rules doxygen-1.5.8/debian/rules
--- doxygen-1.5.8/debian/rules
+++ doxygen-1.5.8/debian/rules
@@ -133,6 +133,7 @@
 	system-libpng \
 	manpages \
 	gd-renderer \
+	path-prefix
 
 patch: patch-stamp
 patch-stamp: $(foreach p,$(debian_patches),patch-stamp-$(p))
diff -u doxygen-1.5.8/debian/changelog doxygen-1.5.8/debian/changelog
--- doxygen-1.5.8/debian/changelog
+++ doxygen-1.5.8/debian/changelog
@@ -1,3 +1,12 @@
+doxygen (1.5.8-1.1) unstable; urgency=low
+
+  * Non-maintainer upload to fix Segmentation Fault.
+  * Applied patch from Gentoo to fix a Segmentation Fault as 
+    debian/patches/path-prefix.dpatch.  Thanks to Martin von Gagern for 
+    the patch and Leandro Lucarella for the pointer.  Closes: #518031
+
+ -- Margarita Manterola <[email protected]>  Tue, 28 Apr 2009 13:01:30 +0000
+
 doxygen (1.5.8-1) unstable; urgency=low
 
   * New upstream version.
only in patch2:
unchanged:
--- doxygen-1.5.8.orig/debian/patches/path-prefix.dpatch
+++ doxygen-1.5.8/debian/patches/path-prefix.dpatch
@@ -0,0 +1,54 @@
+#! /bin/sh -e
+## DP: path-prefix.dpatch by Martin von Gagern
+## DP: Fixes a SegFault related to the prefix variable.
+## DP: Taken from upstream svn r678
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+    dir="$3/"
+elif [ $# -ne 1 ]; then
+    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
+    exit 1
+fi
+case "$1" in
+    -patch)
+        patch $pdir -f --no-backup-if-mismatch -p1 < $0
+        ;;
+    -unpatch)
+        patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+        ;;
+    *)
+    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
+        exit 1
+esac
+exit 0
+
+diff -urNad doxygen-1.5.8~/src/doxygen.cpp doxygen-1.5.8/src/doxygen.cpp
+--- doxygen-1.5.8~/src/doxygen.cpp	2008-12-26 13:02:37.000000000 +0000
++++ doxygen-1.5.8/src/doxygen.cpp	2009-04-28 13:10:07.000000000 +0000
+@@ -8617,6 +8617,7 @@
+   QDict<void> nonSymlinks;
+   QDict<void> known;
+   QCString result = path;
++  QCString oldPrefix = "/";
+   do
+   {
+ #ifdef WIN32
+@@ -8637,7 +8638,7 @@
+         QString target = fi.readLink();
+         if (QFileInfo(target).isRelative())
+         {
+-          target = QDir::cleanDirPath(prefix+"/"+target.data());
++          target = QDir::cleanDirPath(oldPrefix+"/"+target.data());
+         }
+         if (sepPos!=-1)
+         {
+@@ -8656,6 +8657,7 @@
+       {
+         nonSymlinks.insert(prefix,(void*)0x8);
+       }
++      oldPrefix = prefix;
+     }
+   }
+   while (sepPos!=-1);

Reply via email to