diff options
author | Christian Weisgerber <naddy@FreeBSD.org> | 2005-01-11 21:31:48 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@FreeBSD.org> | 2005-01-11 21:31:48 +0000 |
commit | 646f99fca74ea4b13dfec102a3e1e4a83c79cd21 (patch) | |
tree | 1dfdd99d97094d81bc27a12f5d098f1bb482470f /games/xshisen/files | |
parent | c2ec7ecdb259d73fa6eedf04e591426ea0dad7e9 (diff) | |
download | ports-646f99fca74ea4b13dfec102a3e1e4a83c79cd21.tar.gz ports-646f99fca74ea4b13dfec102a3e1e4a83c79cd21.zip |
Notes
Diffstat (limited to 'games/xshisen/files')
-rw-r--r-- | games/xshisen/files/patch-ad | 19 | ||||
-rw-r--r-- | games/xshisen/files/patch-af | 20 | ||||
-rw-r--r-- | games/xshisen/files/patch-readxpm.C | 14 |
3 files changed, 49 insertions, 4 deletions
diff --git a/games/xshisen/files/patch-ad b/games/xshisen/files/patch-ad index d96935d187e8..c7d1cbea043c 100644 --- a/games/xshisen/files/patch-ad +++ b/games/xshisen/files/patch-ad @@ -1,5 +1,8 @@ ---- main.C.orig Sun Dec 12 14:34:28 1999 -+++ main.C Sun Dec 12 14:39:33 1999 + +$FreeBSD$ + +--- main.C.orig ++++ main.C @@ -44,53 +44,53 @@ static XtResource gres[] = { @@ -78,3 +81,15 @@ }; GlobRes globRes; +@@ -194,9 +194,9 @@ + char buffer[100], *p; + char *(*codeconv)(const char*); + +- strcpy(buffer, operation); ++ strlcpy(buffer, operation, sizeof(buffer)); + if (strchr(buffer, '-') == NULL) { +- strcat(buffer, "-" KANJICODE); ++ strlcat(buffer, "-" KANJICODE, sizeof(buffer)); + } + if (strncasecmp(buffer, "jis-euc", 7) == 0) + codeconv = jis_to_euc; diff --git a/games/xshisen/files/patch-af b/games/xshisen/files/patch-af index b324160ddc9e..5b4a63af10c3 100644 --- a/games/xshisen/files/patch-af +++ b/games/xshisen/files/patch-af @@ -1,5 +1,8 @@ ---- score.C.orig Tue Jan 23 00:52:09 1996 -+++ score.C Sat Aug 26 05:10:09 2000 + +$FreeBSD$ + +--- score.C.orig ++++ score.C @@ -4,31 +4,31 @@ XtResource Score::resources[] = { @@ -58,6 +61,19 @@ } void +@@ -371,10 +377,10 @@ + s1 = scoreToRegister / 1000; + ms_to_hms(scoreToRegister, h, m, s); + pw = getpwuid(getuid()); +- strcpy(gecos, pw->pw_gecos); ++ strlcpy(gecos, pw->pw_gecos, sizeof(gecos)); + if ((po = strchr(gecos, ',')) != NULL) + *po = 0; +- sprintf(namebuf, "%-8.8s (%s)", pw->pw_name, gecos); ++ snprintf(namebuf, sizeof(namebuf), "%-8.8s (%s)", pw->pw_name, gecos); + sprintf(myname, "%-28.28s", namebuf); + // Always read the latest high score + readfile(); @@ -414,7 +420,7 @@ strcpy(rec[inspos].name, myname); time(&t); diff --git a/games/xshisen/files/patch-readxpm.C b/games/xshisen/files/patch-readxpm.C new file mode 100644 index 000000000000..44bb429475d5 --- /dev/null +++ b/games/xshisen/files/patch-readxpm.C @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- readxpm.C.orig ++++ readxpm.C +@@ -12,7 +12,7 @@ + char buffer[1024]; + + for(int i=0; i<PKIND; i++) { +- sprintf(buffer, "%s/%s.xpm", directory, files[i]); ++ snprintf(buffer, sizeof(buffer), "%s/%s.xpm", directory, files[i]); + Mp[i].ReadFile(w, buffer, i, globRes.colorCloseness); + } + } |