diff options
author | kris <kris@FreeBSD.org> | 2001-08-23 16:30:29 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-08-23 16:30:29 +0800 |
commit | 17d260fba7b4e19339dbc497cd866d1596586296 (patch) | |
tree | 1455eaf324654d7dafbed6951e7cd868113a332e /sysutils | |
parent | fa045d00d3d9c74b0ad94804d92003e04f156808 (diff) | |
download | freebsd-ports-gnome-17d260fba7b4e19339dbc497cd866d1596586296.tar.gz freebsd-ports-gnome-17d260fba7b4e19339dbc497cd866d1596586296.tar.zst freebsd-ports-gnome-17d260fba7b4e19339dbc497cd866d1596586296.zip |
Don't buffer overflow when reading the config file.
Obtained from: OpenBSD
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/wmcube/Makefile | 1 | ||||
-rw-r--r-- | sysutils/wmcube/files/patch-wmcube.c | 29 |
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"); |