summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2001-08-23 08:30:29 +0000
committerKris Kennaway <kris@FreeBSD.org>2001-08-23 08:30:29 +0000
commit0d2b75876704e8a9c67c14d57c37a38059d1ee96 (patch)
treea88436525720af831da5dc83d34a0f7221e37481 /sysutils
parentadd borzoi (diff)
Don't buffer overflow when reading the config file.
Obtained from: OpenBSD
Notes
Notes: svn path=/head/; revision=46690
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/wmcube/Makefile1
-rw-r--r--sysutils/wmcube/files/patch-wmcube.c29
2 files changed, 30 insertions, 0 deletions
diff --git a/sysutils/wmcube/Makefile b/sysutils/wmcube/Makefile
index c6551f0aa7c0..e00c5c44d5fd 100644
--- a/sysutils/wmcube/Makefile
+++ b/sysutils/wmcube/Makefile
@@ -7,6 +7,7 @@
PORTNAME= wmcube
PORTVERSION= 0.98
+PORTREVISION= 1
CATEGORIES= sysutils windowmaker
MASTER_SITES= http://boombox.campus.luth.se/files/
diff --git a/sysutils/wmcube/files/patch-wmcube.c b/sysutils/wmcube/files/patch-wmcube.c
new file mode 100644
index 000000000000..6f77d7f73613
--- /dev/null
+++ b/sysutils/wmcube/files/patch-wmcube.c
@@ -0,0 +1,29 @@
+--- wmcube.c.orig Mon Oct 23 22:11:47 2000
++++ wmcube.c Tue May 15 16:17:02 2001
+@@ -913,7 +926,7 @@ int loadobj(char *filename) {
+ exit(0);
+ }
+
+- fscanf(fp,"%s",tmp);
++ fscanf(fp,"%63s",tmp);
+
+ if (strcmp(tmp,"WMCUBE_COORDINATES") != 0) {
+ printf("\nError in objectfile: it must start with WMCUBE_COORDINATES\n\n");
+@@ -921,7 +934,7 @@ int loadobj(char *filename) {
+ exit(0);
+ }
+
+- fscanf(fp,"%s",tmp);
++ fscanf(fp,"%63s",tmp);
+ counter = atoi(tmp);
+
+ while ((strcmp(tmp,"WMCUBE_LINES") != 0) && (strcmp(tmp,"WMCUBE_PLANES") != 0)) {
+@@ -938,7 +951,7 @@ int loadobj(char *filename) {
+ fclose(fp);
+ exit(0);
+ }
+- fscanf(fp,"%s",tmp);
++ fscanf(fp,"%63s",tmp);
+
+ if (feof(fp)) {
+ printf("\nError in objectfile: you must have a section WMCUBE_LINES or WMCUBE_PLANES\n\n");