On Fri, Dec 12, 2008 at 08:44:28PM +0100, Adeodato Simó wrote:
> Please attach the patch so that we can decide, and sorry for the delayed
> response.

Sorry, attached this time :-)



-- 
Jonathan Wiltshire

PGP/GPG: 0xDB800B52 / 4216 F01F DCA9 21AC F3D3  A903 CA6B EA3E DB80 0B52
Sending of encrypted mail is encouraged

diff -u gxemul-0.4.6.3/debian/control gxemul-0.4.6.3/debian/control
--- gxemul-0.4.6.3/debian/control
+++ gxemul-0.4.6.3/debian/control
@@ -1,8 +1,8 @@
 Source: gxemul
 Section: misc
 Priority: extra
-Maintainer: Göran Weinholt <[email protected]>
-Build-Depends: debhelper (>= 4.1.0), libx11-dev
+Maintainer: Jonathan Wiltshire <[email protected]>
+Build-Depends: debhelper (>= 4.1.0), libx11-dev, dpatch
 Standards-Version: 3.7.3
 
 Package: gxemul
diff -u gxemul-0.4.6.3/debian/changelog gxemul-0.4.6.3/debian/changelog
--- gxemul-0.4.6.3/debian/changelog
+++ gxemul-0.4.6.3/debian/changelog
@@ -1,3 +1,10 @@
+gxemul (0.4.6.3-1+lenny1) testing-proposed-updates; urgency=low
+
+  * Patch against segmentation fault when called with invalid parameters
+  * New maintainer
+
+ -- Jonathan Wiltshire <[email protected]>  Fri, 12 Dec 2008 21:59:57 
+0000
+
 gxemul (0.4.6.3-1) unstable; urgency=low
 
   * New upstream release.
diff -u gxemul-0.4.6.3/debian/rules gxemul-0.4.6.3/debian/rules
--- gxemul-0.4.6.3/debian/rules
+++ gxemul-0.4.6.3/debian/rules
@@ -3,26 +3,29 @@
 
 CFLAGS = -g
 
+include /usr/share/dpatch/dpatch.make
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
   CFLAGS += -O0
 else
   CFLAGS += -O2
 endif
 
-configure: configure-stamp
+configure: patch configure-stamp
 configure-stamp:
        dh_testdir
        # Configure the package
        CFLAGS="${CFLAGS}" ./configure
        touch configure-stamp
 
-build: configure-stamp build-stamp
+build: configure build-stamp
 build-stamp:
        dh_testdir
        $(MAKE)
        touch build-stamp
 
-clean:
+clean: clean-patched unpatch
+clean-patched:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
@@ -32,7 +35,7 @@
 install: build
        dh_testdir
        dh_testroot
-       dh_clean
+#      dh_clean
 
 binary-indep:
 
only in patch2:
unchanged:
--- gxemul-0.4.6.3.orig/debian/patches/00list
+++ gxemul-0.4.6.3/debian/patches/00list
@@ -0,0 +1 @@
+05_segfault_params
only in patch2:
unchanged:
--- gxemul-0.4.6.3.orig/debian/patches/05_segfault_params.dpatch
+++ gxemul-0.4.6.3/debian/patches/05_segfault_params.dpatch
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_segfault_params.dpatch by  <Jonathan Wiltshire 
<[email protected]>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't segfault on arbitrary parameters
+
+...@dpatch@
+diff -urNad gxemul-0.4.6.6~/src/main.c gxemul-0.4.6.6/src/main.c
+--- gxemul-0.4.6.6~/src/main.c 2008-11-16 15:35:57.000000000 +0000
++++ gxemul-0.4.6.6/src/main.c  2008-11-24 11:08:05.000000000 +0000
+@@ -714,6 +714,13 @@
+ 
+       get_cmd_args(argc, argv, emul, &diskimages, &n_diskimages);
+ 
++      if (emul->machines[0]->machine_type == MACHINE_NONE) {
++              printf("No machine type specified? Run  gxemul -H  for a list\n"
++                  "of available machine types. Use the -e or -E option(s)\n"
++                  "to specify the machine type.\n");
++              exit(1);
++      }
++
+       if (!skip_srandom_call) {
+               struct timeval tv;
+               gettimeofday(&tv, NULL);

Attachment: signature.asc
Description: Digital signature

Reply via email to