aboutsummaryrefslogtreecommitdiff
path: root/games/typespeed
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2006-04-04 12:22:29 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2006-04-04 12:22:29 +0000
commit6f8217d7cab2945e3ac07e4a4742f51dd2f57f43 (patch)
tree28c95764a5852a23aa4cdf7cc7d9db0eb587ae8a /games/typespeed
parent6767b67925c684d7caa0cfc1f648e3cc695be77c (diff)
downloadports-6f8217d7cab2945e3ac07e4a4742f51dd2f57f43.tar.gz
ports-6f8217d7cab2945e3ac07e4a4742f51dd2f57f43.zip
Fix a bug which caused typespeed to access memory beyond the area it allocated.
Notified by: kris Obtained from: debian
Notes
Notes: svn path=/head/; revision=158766
Diffstat (limited to 'games/typespeed')
-rw-r--r--games/typespeed/Makefile1
-rw-r--r--games/typespeed/files/patch-file.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/games/typespeed/Makefile b/games/typespeed/Makefile
index 03d9c13d7645..091eecf13a03 100644
--- a/games/typespeed/Makefile
+++ b/games/typespeed/Makefile
@@ -7,6 +7,7 @@
PORTNAME= typespeed
PORTVERSION= 0.4.4
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= http://ls.purkki.org/typespeed/
DISTNAME= typespeed-${PORTVERSION}
diff --git a/games/typespeed/files/patch-file.c b/games/typespeed/files/patch-file.c
new file mode 100644
index 000000000000..63c53111d0e1
--- /dev/null
+++ b/games/typespeed/files/patch-file.c
@@ -0,0 +1,13 @@
+--- file.c.orig Mon Apr 3 15:44:40 2006
++++ file.c Mon Apr 3 15:47:21 2006
+@@ -492,8 +492,8 @@
+ char tmp[10];
+ char *userhome;
+
+- userhome = malloc(1+strlen(getenv("HOME"))+strlen(LOCALCONF)*sizeof(char));
+- sprintf(userhome,getenv("HOME"));
++ userhome = malloc((2+strlen(getenv("HOME"))+strlen(LOCALCONF))*sizeof(char));
++ strcpy(userhome,getenv("HOME"));
+ strcat(userhome,"/");
+ strcat(userhome,LOCALCONF);
+ hakemisto = malloc(1026 * sizeof(char));