[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#695399: marked as done (unblock: bsdgames-nonfree/2.17-5)



Your message dated Sat, 08 Dec 2012 03:55:59 +0100
with message-id <50C2AC3F.2060601@thykier.net>
and subject line Re: Bug#695399: unblock: bsdgames-nonfree/2.17-5
has caused the Debian Bug report #695399,
regarding unblock: bsdgames-nonfree/2.17-5
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
695399: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695399
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package bsdgames-nonfree.

Version 2.17-5 fixes a bug (#695262) that could make saved games fail
to load properly, leading to crashes, due to inappropriate
(de)serialization of raw pointers to string constants.  (This
technique was always fragile, and enabling PIE hardening in 2.17-4 had
the side effect of breaking it altogether.)  The new version also
corrects one apparent typo to ensure better internal consistency,
including across saves.

Please see below or
http://anonscm.debian.org/gitweb/?p=users/ucko/bsdgames-nonfree.git;a=commitdiff;h=75272079ba9b12b43149965f328ab6ac80d21715;hp=8af82527b675f742c91e1ea662c6d107b18f4809
for the changes from 2.17-4, which is in testing.

unblock bsdgames-nonfree/2.17-5

Thanks!

diff -u bsdgames-nonfree-2.17/debian/changelog bsdgames-nonfree-2.17/debian/changelog
--- bsdgames-nonfree-2.17/debian/changelog
+++ bsdgames-nonfree-2.17/debian/changelog
@@ -1,3 +1,16 @@
+bsdgames-nonfree (2.17-5) unstable; urgency=high
+
+  * rogue/init.c: Give the initial bow a damage value of 1d1 for
+    consistency with object.c; 1d2 was presumably a typo.
+  * rogue/{object.c,rogue.h,save.c}: factor an assign_damage function out
+    of gr_weapon, and call it from read_pack because saved values (raw
+    pointers to string constants) may be invalid.  (The setup was always
+    fragile, and broke altogether when 2.17-4 made the executable
+    position-independent and subject to loading at randomized addresses.)
+    (Closes: #695262.)
+
+ -- Aaron M. Ucko <ucko@debian.org>  Thu, 06 Dec 2012 21:53:01 -0500
+
 bsdgames-nonfree (2.17-4) unstable; urgency=low
 
   * config.params: defer to debian/rules for build flags (which weren't
only in patch2:
unchanged:
--- bsdgames-nonfree-2.17.orig/rogue/rogue.h
+++ bsdgames-nonfree-2.17/rogue/rogue.h
@@ -464,6 +464,7 @@
 void	add_traps(void);
 void	aggravate(void);
 void	aim_monster(object *);
+void    assign_damage(object *);
 void	bounce(short, short, short, short, short);
 void	byebye(int);
 void	c_object_for_wizard(void);
only in patch2:
unchanged:
--- bsdgames-nonfree-2.17.orig/rogue/object.c
+++ bsdgames-nonfree-2.17/rogue/object.c
@@ -533,6 +533,13 @@
 			}
 		}
 	}
+	assign_damage(obj);
+}
+
+void
+assign_damage(obj)
+	object *obj;
+{
 	switch(obj->which_kind) {
 	case BOW:
 	case DART:
@@ -556,6 +563,9 @@
 	case TWO_HANDED_SWORD:
 		obj->damage = "4d5";
 		break;
+	default:
+		obj->damage = "1d1";
+		break;
 	}
 }
 
only in patch2:
unchanged:
--- bsdgames-nonfree-2.17.orig/rogue/save.c
+++ bsdgames-nonfree-2.17/rogue/save.c
@@ -263,6 +263,10 @@
 		}
 		new_obj = alloc_object();
 		*new_obj = read_obj;
+		/* new_obj->damage is a pointer, and not guaranteed to be valid
+		 * across runs with slightly different binaries, or even the
+		 * same binary if built as a position-independent executable. */
+		assign_damage(new_obj);
 		if (is_rogue) {
 			if (new_obj->in_use_flags & BEING_WORN) {
 				do_wear(new_obj);
only in patch2:
unchanged:
--- bsdgames-nonfree-2.17.orig/rogue/init.c
+++ bsdgames-nonfree-2.17/rogue/init.c
@@ -168,7 +168,7 @@
 	obj = alloc_object();
 	obj->what_is = WEAPON;
 	obj->which_kind = BOW;
-	obj->damage = "1d2";
+	obj->damage = "1d1"; /* per object.c; was 1d2 */
 	obj->hit_enchant = 1;
 	obj->d_enchant = 0;
 	obj->identified = 1;

--- End Message ---
--- Begin Message ---
On 2012-12-07 19:19, Aaron M. Ucko wrote:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> Please unblock package bsdgames-nonfree.
> 
> Version 2.17-5 fixes a bug (#695262) that could make saved games fail
> to load properly, leading to crashes, due to inappropriate
> (de)serialization of raw pointers to string constants.  (This
> technique was always fragile, and enabling PIE hardening in 2.17-4 had
> the side effect of breaking it altogether.)  The new version also
> corrects one apparent typo to ensure better internal consistency,
> including across saves.
> 
> Please see below or
> http://anonscm.debian.org/gitweb/?p=users/ucko/bsdgames-nonfree.git;a=commitdiff;h=75272079ba9b12b43149965f328ab6ac80d21715;hp=8af82527b675f742c91e1ea662c6d107b18f4809
> for the changes from 2.17-4, which is in testing.
> 
> unblock bsdgames-nonfree/2.17-5
> 
> Thanks!
> 
> [...]

Unblocked, thanks.

~Niels

--- End Message ---

Reply to: