[zoom-player] 03/03: Pull in upstream commit 5ef19e08bbeff74096a1944ec8ba591cdab8cc55.

Stephen Kitt skitt at moszumanska.debian.org
Sun Jan 17 15:34:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch master
in repository zoom-player.

commit 789e185b49d3594c0de9befc36a325422114f460
Author: Stephen Kitt <steve at sk2.org>
Date:   Sat Jan 16 22:27:31 2016 +0100

    Pull in upstream commit 5ef19e08bbeff74096a1944ec8ba591cdab8cc55.
---
 debian/patches/restore-return.patch | 33 +++++++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 2 files changed, 34 insertions(+)

diff --git a/debian/patches/restore-return.patch b/debian/patches/restore-return.patch
new file mode 100644
index 0000000..9412980
--- /dev/null
+++ b/debian/patches/restore-return.patch
@@ -0,0 +1,33 @@
+commit 5ef19e08bbeff74096a1944ec8ba591cdab8cc55
+Author: Andrew Hunter <andrew at logicalshift.co.uk>
+Date:   Sun Nov 13 21:20:23 2011 +0000
+
+    Restored a return statement that got deleted way back in changeset 1cd73ed without anybody (well, me) noticing.
+    
+    The effect of this missing return statement was to make aread callbacks that return true continue as if they had returned false and randomly crash after they try to write to the (now freed) buffer.
+    
+    Amazingly, this hasn't been reported up until now. I suspect that there are few or no cases where aread callbacks return a value other than zero.
+    
+    Also added a paranoid buffer check, which is probably unnecessary but looks like good practice in any case.
+
+diff --git a/src/interp.c b/src/interp.c
+index 60b3e13..a5fa8fe 100644
+--- a/src/interp.c
++++ b/src/interp.c
+@@ -1057,6 +1057,7 @@ static void zcode_op_aread_5678(ZDWord* pc,
+ 	{
+ 	  mem[1] = 0;
+ 	  free(buf);
++	  return;
+ 	}
+     }
+   
+@@ -1151,7 +1152,7 @@ static void zcode_op_aread_5678(ZDWord* pc,
+ 	  int x;
+ 
+ 	  mem[1] = 0;
+-	  for (x=0; buf[x] != 0; x++)
++	  for (x=0; buf[x] != 0 && x < bufLen; x++)
+ 	    {
+ 	      mem[1]++;
+ 	      buf[x] = unicode_to_lower(buf[x]);
diff --git a/debian/patches/series b/debian/patches/series
index 50682fc..89d3262 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 # You must remove unused comment lines for the released package.
 acinclude.patch
+restore-return.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/zoom-player.git



More information about the Pkg-games-commits mailing list