[SCM] Packaging for the OpenArena engine branch, master, updated. debian/0.8.5-5+exp3-6-g244dd8c

Simon McVittie smcv at debian.org
Sat Feb 5 22:33:40 UTC 2011


The following commit has been merged in the master branch:
commit 1fe80ea424e98f430e7743c40025c979708387fa
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Feb 5 17:47:22 2011 +0000

    Don't strcpy a buffer into itself

diff --git a/debian/changelog b/debian/changelog
index 19930bb..3888249 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ openarena (0.8.5-6) UNRELEASED; urgency=low
   * Use com_basegame, com_homepath etc. from recent upstream ioquake3 (still
     compatible with older versions for now)
   * Add an openarena-dbg package
+  * Don't strcpy a buffer into itself, squashing a valgrind warning
 
  -- Simon McVittie <smcv at debian.org>  Fri, 04 Feb 2011 22:11:01 +0000
 
diff --git a/debian/patches/0001-EasyClientName-don-t-strcpy-a-buffer-into-itself.patch b/debian/patches/0001-EasyClientName-don-t-strcpy-a-buffer-into-itself.patch
new file mode 100644
index 0000000..45092a9
--- /dev/null
+++ b/debian/patches/0001-EasyClientName-don-t-strcpy-a-buffer-into-itself.patch
@@ -0,0 +1,23 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 5 Feb 2011 17:24:14 +0000
+Subject: [PATCH] EasyClientName: don't strcpy a buffer into itself
+
+ClientName returns the buffer you passed in, and strcpy'ing overlapping
+(or in this case, identical) buffers isn't valid.
+---
+ code/game/ai_dmq3.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/code/game/ai_dmq3.c b/code/game/ai_dmq3.c
+index 40cfe14..c10cecd 100644
+--- a/game/code/game/ai_dmq3.c
++++ b/game/code/game/ai_dmq3.c
+@@ -1488,7 +1488,7 @@ char *EasyClientName(int client, char *buf, int size) {
+ 	char *str1, *str2, *ptr, c;
+ 	char name[128];
+ 
+-	strcpy(name, ClientName(client, name, sizeof(name)));
++	ClientName(client, name, sizeof(name));
+ 	for (i = 0; name[i]; i++) name[i] &= 127;
+ 	//remove all spaces
+ 	for (ptr = strstr(name, " "); ptr; ptr = strstr(name, " ")) {
diff --git a/debian/patches/series b/debian/patches/series
index fa18455..5102672 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+0001-EasyClientName-don-t-strcpy-a-buffer-into-itself.patch
 0031-Fix-FTBFS-on-kFreeBSD.patch
 0036-Add-error-markers-to-sources-in-the-mod-SDK-that-are.patch
 0039-Used-self-enemy-before-it-was-initialized.-Might-hav.patch

-- 
Packaging for the OpenArena engine



More information about the Pkg-games-commits mailing list