diff -Nru asylum-0.3.2/debian/asylum.6 asylum-0.3.2/debian/asylum.6 --- asylum-0.3.2/debian/asylum.6 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/asylum.6 2015-11-26 20:19:42.000000000 +0000 @@ -21,7 +21,7 @@ Young Sigmund has a few problems. To help him resolve his mental instability, you must enter the surreal world of his inner mind and shut down the -malfunctioning brain cells. +malfunctioning brain cells. . .SH "HOW TO PLAY" . @@ -31,7 +31,7 @@ eight pulsating neurons scattered throughout the immense map. Use .BR "Z" ", " "X" ", " ";" " and " "." -to move and +to move and .B "Enter" to fire, or remap the keys to something you like better. . @@ -40,7 +40,7 @@ The one game feature which does merit explicit instruction is teleporting. In the first level ("Ego") the teleporters look like candelabra. To use a teleporter, stand in its centre and press "down" -(that's +(that's .B "." with the default key settings). . diff -Nru asylum-0.3.2/debian/asylum.desktop asylum-0.3.2/debian/asylum.desktop --- asylum-0.3.2/debian/asylum.desktop 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/asylum.desktop 2015-11-26 20:19:42.000000000 +0000 @@ -2,8 +2,10 @@ Type=Application Name=Asylum Comment=surreal platform shooting game +Comment[de]=Surrealistisches Plattform-Ballerspiel Icon=asylum Exec=asylum Terminal=false Categories=Game;ActionGame; StartupNotify=false +Keywords=platform;surreal;shooting; diff -Nru asylum-0.3.2/debian/asylum.docs asylum-0.3.2/debian/asylum.docs --- asylum-0.3.2/debian/asylum.docs 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/asylum.docs 2015-11-26 20:19:42.000000000 +0000 @@ -1,2 +1,2 @@ -README Instruct +README diff -Nru asylum-0.3.2/debian/asylum.install asylum-0.3.2/debian/asylum.install --- asylum-0.3.2/debian/asylum.install 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/asylum.install 2015-11-26 20:19:42.000000000 +0000 @@ -1,3 +1,2 @@ -debian/asylum.xpm usr/share/pixmaps/ debian/asylum.desktop usr/share/applications/ - +debian/asylum.xpm usr/share/pixmaps/ diff -Nru asylum-0.3.2/debian/asylum.manpages asylum-0.3.2/debian/asylum.manpages --- asylum-0.3.2/debian/asylum.manpages 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/asylum.manpages 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1 @@ +debian/asylum.6 diff -Nru asylum-0.3.2/debian/asylum.postrm asylum-0.3.2/debian/asylum.postrm --- asylum-0.3.2/debian/asylum.postrm 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/asylum.postrm 2015-11-26 20:19:42.000000000 +0000 @@ -11,8 +11,8 @@ case "$1" in remove) ;; - - purge) + + purge) rm -f $SCOREFILES rmdir --ignore-fail-on-non-empty /var/games/asylum ;; diff -Nru asylum-0.3.2/debian/changelog asylum-0.3.2/debian/changelog --- asylum-0.3.2/debian/changelog 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/changelog 2015-11-26 20:19:42.000000000 +0000 @@ -1,3 +1,22 @@ +asylum (0.3.2-2) unstable; urgency=medium + + * Team upload. + * wrap-and-sort -sa. + * Declare compliance with Debian Policy 3.9.6. + * Use compat level 9 and require debhelper >= 9. + * Switch to source format 3.0 (quilt). + * Use canonical Vcs-URI. + * asylum-data: Suggest asylum. + * asylum.desktop: Add keywords and comment in German. + * Convert debian/rules to dh sequencer. Add asylum.manpages file. + * Fix buffer overruns and compiler warnings. + Thanks to Johann Klammer for the report and Peter De Wachter for the + patches. (Closes: #785109) + * Add ${misc:Depends} to asylum-data. + * Add clean file and remove pre-built asylum binary. + + -- Markus Koschany Thu, 26 Nov 2015 20:50:18 +0100 + asylum (0.3.2-1) unstable; urgency=low * New upstream upstream version. diff -Nru asylum-0.3.2/debian/clean asylum-0.3.2/debian/clean --- asylum-0.3.2/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/clean 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1 @@ +asylum diff -Nru asylum-0.3.2/debian/compat asylum-0.3.2/debian/compat --- asylum-0.3.2/debian/compat 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/compat 2015-11-26 20:19:42.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru asylum-0.3.2/debian/control asylum-0.3.2/debian/control --- asylum-0.3.2/debian/control 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/control 2015-11-26 20:19:42.000000000 +0000 @@ -2,19 +2,25 @@ Section: games Priority: optional Maintainer: Debian Games Team -Uploaders: Peter De Wachter -Build-Depends: debhelper (>= 7), - libsdl1.2-dev, libsdl-mixer1.2-dev, - libglu1-mesa-dev | libglu-dev, libgl1-mesa-dev | libgl-dev -Standards-Version: 3.8.3 +Uploaders: + Peter De Wachter +Build-Depends: + debhelper (>= 9), + libgl1-mesa-dev | libgl-dev, + libglu1-mesa-dev | libglu-dev, + libsdl-mixer1.2-dev, + libsdl1.2-dev +Standards-Version: 3.9.6 Homepage: http://sdl-asylum.sourceforge.net/ -Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/asylum/ -Vcs-Browser: http://svn.debian.org/viewsvn/pkg-games/packages/trunk/asylum/ +Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/asylum/ +Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/asylum/ Package: asylum Architecture: any -Depends: asylum-data (= ${source:Version}), - ${shlibs:Depends}, ${misc:Depends} +Depends: + asylum-data (= ${source:Version}), + ${misc:Depends}, + ${shlibs:Depends} Description: surreal platform shooting game Young Sigmund has a few problems. To help him resolve his mental instability you must enter the surreal world of his inner mind and @@ -28,6 +34,9 @@ Package: asylum-data Architecture: all -Recommends: asylum +Depends: + ${misc:Depends} +Suggests: + asylum Description: surreal platform shooting game - data files This package contains data files required by the game Asylum. diff -Nru asylum-0.3.2/debian/patches/0001-wipealtab-bounds-check.patch asylum-0.3.2/debian/patches/0001-wipealtab-bounds-check.patch --- asylum-0.3.2/debian/patches/0001-wipealtab-bounds-check.patch 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/patches/0001-wipealtab-bounds-check.patch 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1,25 @@ +From f7ef4d3c285d7946f577469e9e0b93da658f0b75 Mon Sep 17 00:00:00 2001 +From: Peter De Wachter +Date: Tue, 12 May 2015 23:27:34 +0200 +Subject: [PATCH 1/5] wipealtab(): bounds check + +--- + alien.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/alien.c b/alien.c +index 90c2a4e..ac9ff53 100644 +--- a/alien.c ++++ b/alien.c +@@ -1689,7 +1689,7 @@ void wipealtab() + //aladr = alofs; + alent* r10 = aladr; + alctr = 0; +- for (int r9 = _alno; r9 >= 0; r9--) ++ for (int r9 = _alno; r9 > 0; r9--) + { + l9: + r10->type = 0; +-- +2.1.4 + diff -Nru asylum-0.3.2/debian/patches/0002-swi_osfile-fix-EOF-handling.patch asylum-0.3.2/debian/patches/0002-swi_osfile-fix-EOF-handling.patch --- asylum-0.3.2/debian/patches/0002-swi_osfile-fix-EOF-handling.patch 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/patches/0002-swi_osfile-fix-EOF-handling.patch 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1,27 @@ +From eea77829cc17817abd5b218b3e1d969cec619a32 Mon Sep 17 00:00:00 2001 +From: Peter De Wachter +Date: Tue, 12 May 2015 23:33:00 +0200 +Subject: [PATCH 2/5] swi_osfile(): fix EOF handling + +Old code wrote an extra -1 byte, which caused a buffer overflow in +loadvitalfile(). +--- + file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/file.c b/file.c +index 48e1346..deda6fe 100644 +--- a/file.c ++++ b/file.c +@@ -343,7 +343,7 @@ int swi_osfile(int op, const char* name, char* start, char* end) + case 14: // load file + f = fopen(name, "rb"); + if (f == NULL) return -1; +- for (char* i = start; !feof(f); i++) *i = fgetc(f); ++ while ((x = fgetc(f)) != EOF) *start++ = x; + fclose(f); + return 0; + } +-- +2.1.4 + diff -Nru asylum-0.3.2/debian/patches/0003-loadconfig-fix-scanf-buffer-overflow.patch asylum-0.3.2/debian/patches/0003-loadconfig-fix-scanf-buffer-overflow.patch --- asylum-0.3.2/debian/patches/0003-loadconfig-fix-scanf-buffer-overflow.patch 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/patches/0003-loadconfig-fix-scanf-buffer-overflow.patch 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1,27 @@ +From 59c1b6eb856fb50157750aefe1c6f01b92c0ee10 Mon Sep 17 00:00:00 2001 +From: Peter De Wachter +Date: Tue, 12 May 2015 23:29:26 +0200 +Subject: [PATCH 3/5] loadconfig(): fix scanf buffer overflow + +scanf "%12s" needs a 13 byte buffer, as it will write up to 12 +characters and a nul byte. +--- + asylum.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/asylum.c b/asylum.c +index 8fe9a5b..0caf0fb 100644 +--- a/asylum.c ++++ b/asylum.c +@@ -665,7 +665,7 @@ char idpermitstring[] = "You are now permitted to play the ID!!!\n"; + + void loadconfig() + { +- char keyword[12]; ++ char keyword[13]; + + FILE* r0 = find_config(0x40); // read access + if (r0 != NULL) +-- +2.1.4 + diff -Nru asylum-0.3.2/debian/patches/0004-swi_blitz_hammerop-missing-fclose.patch asylum-0.3.2/debian/patches/0004-swi_blitz_hammerop-missing-fclose.patch --- asylum-0.3.2/debian/patches/0004-swi_blitz_hammerop-missing-fclose.patch 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/patches/0004-swi_blitz_hammerop-missing-fclose.patch 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1,28 @@ +From ca2b8974bd5108879850e4b916f93a845e51936f Mon Sep 17 00:00:00 2001 +From: Peter De Wachter +Date: Tue, 12 May 2015 23:38:19 +0200 +Subject: [PATCH 4/5] swi_blitz_hammerop(): missing fclose() + +--- + file.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/file.c b/file.c +index deda6fe..d3ece9a 100644 +--- a/file.c ++++ b/file.c +@@ -362,7 +362,10 @@ int swi_blitz_hammerop(int op, char* name, char* path, char* space) + fclose(f); return op; + } // file is not Hammered + +- if (op == 0) return 0x24000; // hack: should return length ++ if (op == 0) ++ { ++ fclose(f); return 0x24000; // hack: should return length ++ } + char a[524288]; + int p = 0; + char c; +-- +2.1.4 + diff -Nru asylum-0.3.2/debian/patches/0005-dropprivs-add-error-checking.patch asylum-0.3.2/debian/patches/0005-dropprivs-add-error-checking.patch --- asylum-0.3.2/debian/patches/0005-dropprivs-add-error-checking.patch 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/patches/0005-dropprivs-add-error-checking.patch 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1,35 @@ +From da88faa49b6f404a3e2adc0d2e75b1404be28cff Mon Sep 17 00:00:00 2001 +From: Peter De Wachter +Date: Tue, 12 May 2015 23:42:02 +0200 +Subject: [PATCH 5/5] dropprivs(): add error checking + +--- + file.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/file.c b/file.c +index d3ece9a..577795d 100644 +--- a/file.c ++++ b/file.c +@@ -83,8 +83,16 @@ FILE* find_config(int op) + void dropprivs() + { + #ifndef _WIN32 +- setregid(getgid(), getgid()); +- setreuid(getuid(), getuid()); ++ if (setregid(getgid(), getgid()) != 0) ++ { ++ fprintf(stderr, "setregid failed\n"); ++ exit(1); ++ } ++ if (setreuid(getuid(), getuid()) != 0) ++ { ++ fprintf(stderr, "setreuid failed\n"); ++ exit(1); ++ } + #endif + } + +-- +2.1.4 + diff -Nru asylum-0.3.2/debian/patches/series asylum-0.3.2/debian/patches/series --- asylum-0.3.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/patches/series 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1,5 @@ +0001-wipealtab-bounds-check.patch +0002-swi_osfile-fix-EOF-handling.patch +0003-loadconfig-fix-scanf-buffer-overflow.patch +0004-swi_blitz_hammerop-missing-fclose.patch +0005-dropprivs-add-error-checking.patch diff -Nru asylum-0.3.2/debian/rules asylum-0.3.2/debian/rules --- asylum-0.3.2/debian/rules 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/rules 2015-11-26 20:19:42.000000000 +0000 @@ -1,63 +1,25 @@ #!/usr/bin/make -f -build: build-arch build-indep +CFLAGS := $(shell dpkg-buildflags --get CFLAGS) +CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS) -build-arch: build-arch-stamp -build-arch-stamp: - dh_testdir - $(MAKE) CFLAGS="$(CFLAGS)" - touch $@ +%: + dh $@ -build-indep: -# Nothing to do here. +override_dh_auto_build: + $(MAKE) CFLAGS="$(CFLAGS)" -clean: - dh_testdir - make clean RM='rm -f' - dh_clean - -install: - dh_testdir - dh_testroot - dh_prep - dh_installdirs - $(MAKE) install-binary install-resources \ +override_dh_auto_install-arch: + $(MAKE) install-binary \ INSTALLBIN=debian/asylum/usr/games/asylum \ + +override_dh_auto_install-indep: + $(MAKE) install-resources \ INSTALLRESOURCEPATH=debian/asylum-data/usr/share/games/asylum -binary-arch: install - dh_testdir -a - dh_testroot -a - dh_install -a - dh_installchangelogs -a - dh_installdocs -a - dh_installman -a debian/asylum.6 - dh_installmenu -a - dh_strip -a - dh_compress -a - dh_fixperms -a +override_dh_fixperms-arch: + dh_fixperms # Make asylum sgid games, needed to write high scores in /var/games/asylum/ chown root:games debian/asylum/usr/games/asylum chmod g+s debian/asylum/usr/games/asylum - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a - -binary-indep: install - dh_testdir -i - dh_testroot -i - dh_installchangelogs -i - dh_installdocs -i - dh_compress -i - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -binary: binary-arch binary-indep - -.PHONY: build build-arch build-indep clean install binary-arch binary-indep binary diff -Nru asylum-0.3.2/debian/source/format asylum-0.3.2/debian/source/format --- asylum-0.3.2/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ asylum-0.3.2/debian/source/format 2015-11-26 20:19:42.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru asylum-0.3.2/debian/watch asylum-0.3.2/debian/watch --- asylum-0.3.2/debian/watch 2015-11-27 11:50:27.000000000 +0000 +++ asylum-0.3.2/debian/watch 2015-11-26 20:19:42.000000000 +0000 @@ -1,3 +1,2 @@ -version=2 - +version=3 http://sf.net/sdl-asylum/asylum-(.*)\.tar\.gz