aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2006-04-04 20:22:29 +0800
committerehaupt <ehaupt@FreeBSD.org>2006-04-04 20:22:29 +0800
commit0e9edb698c3b9277697dc4ae5408c4c2f22b522d (patch)
tree7bf1bfd05d46a43c58b8f3b0e335c3cd603c2714 /games
parentfff43eba3d49cbebc1b9eeda2cd3db06b52b8061 (diff)
downloadfreebsd-ports-gnome-0e9edb698c3b9277697dc4ae5408c4c2f22b522d.tar.gz
freebsd-ports-gnome-0e9edb698c3b9277697dc4ae5408c4c2f22b522d.tar.zst
freebsd-ports-gnome-0e9edb698c3b9277697dc4ae5408c4c2f22b522d.zip
Fix a bug which caused typespeed to access memory beyond the area it allocated.
Notified by: kris Obtained from: debian
Diffstat (limited to 'games')
-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));