diff options
author | adrianp <adrianp@pkgsrc.org> | 2005-09-11 11:44:29 +0000 |
---|---|---|
committer | adrianp <adrianp@pkgsrc.org> | 2005-09-11 11:44:29 +0000 |
commit | c55f6acbcf87cc748a9b35ecd3708738790ede98 (patch) | |
tree | 3ed5f6be717f54ae8a95ccc409023d429047381e /games | |
parent | 79366c8c053546f1abbbfef13fa6f359dabb9359 (diff) | |
download | pkgsrc-c55f6acbcf87cc748a9b35ecd3708738790ede98.tar.gz |
Update to nb1 for security fix: http://secunia.com/advisories/16696/
Patches via Gentoo and OpenTTD SVN tree
Add pkg-config as a required tool
Alter how ${WRKSRC} is defined so future nb bumps work better
Diffstat (limited to 'games')
-rw-r--r-- | games/openttd/Makefile | 7 | ||||
-rw-r--r-- | games/openttd/distinfo | 10 | ||||
-rw-r--r-- | games/openttd/patches/patch-ac | 13 | ||||
-rw-r--r-- | games/openttd/patches/patch-ad | 22 | ||||
-rw-r--r-- | games/openttd/patches/patch-ae | 36 | ||||
-rw-r--r-- | games/openttd/patches/patch-af | 45 | ||||
-rw-r--r-- | games/openttd/patches/patch-ag | 13 | ||||
-rw-r--r-- | games/openttd/patches/patch-ah | 13 | ||||
-rw-r--r-- | games/openttd/patches/patch-ai | 31 | ||||
-rw-r--r-- | games/openttd/patches/patch-aj | 13 |
10 files changed, 199 insertions, 4 deletions
diff --git a/games/openttd/Makefile b/games/openttd/Makefile index 6b02eb81e73..bfdca265e9f 100644 --- a/games/openttd/Makefile +++ b/games/openttd/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.6 2005/09/08 19:06:02 rpaulo Exp $ +# $NetBSD: Makefile,v 1.7 2005/09/11 11:44:29 adrianp Exp $ DISTNAME= openttd-0.4.0.1-source PKGNAME= openttd-0.4.0.1 +PKGREVISION= 1 CATEGORIES= games x11 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openttd/} @@ -9,7 +10,7 @@ MAINTAINER= froz@icix.org HOMEPAGE= http://www.openttd.com/ COMMENT= Open source clone of Transport Tycoon Deluxe -USE_TOOLS+= gmake +USE_TOOLS+= gmake pkg-config DATA_DIR= ${PREFIX}/share/games/openttd @@ -22,7 +23,7 @@ MAKE_ENV+= PERSONAL_DIR=.openttd MAKE_ENV+= WITH_NETWORK=1 MAKE_ENV+= X11BASE=${X11BASE} -WRKSRC= ${WRKDIR}/${PKGNAME} +WRKSRC= ${WRKDIR}/${DISTNAME:S/-source//} INSTALLATION_DIRS= bin diff --git a/games/openttd/distinfo b/games/openttd/distinfo index 9b701784cd5..8a422293636 100644 --- a/games/openttd/distinfo +++ b/games/openttd/distinfo @@ -1,7 +1,15 @@ -$NetBSD: distinfo,v 1.2 2005/09/08 19:06:02 rpaulo Exp $ +$NetBSD: distinfo,v 1.3 2005/09/11 11:44:29 adrianp Exp $ SHA1 (openttd-0.4.0.1-source.tar.gz) = 992d3d497161b63cb8de94f34ed63611e23ae08e RMD160 (openttd-0.4.0.1-source.tar.gz) = 4bd07812c27cf7a637feaf92ee66ccdff56c6b65 Size (openttd-0.4.0.1-source.tar.gz) = 2950778 bytes SHA1 (patch-aa) = aebea9710752bd4b8a7f5562f0ee49ac8b071d68 SHA1 (patch-ab) = 1353468886982f88180279319e704a70ace8301f +SHA1 (patch-ac) = ed02aac0e304c8b32783d0d9e8c5c6c0a0922743 +SHA1 (patch-ad) = edcab881f70c59bf02b6ef434255d8ba0a1852a6 +SHA1 (patch-ae) = fe505481f222ec850cf62dcd7780b47ae655ebb8 +SHA1 (patch-af) = 5eac3df49f155e6640870de59730946c8571ee64 +SHA1 (patch-ag) = 08fffdde2f6fb5bda88f044365f9bc87082e0247 +SHA1 (patch-ah) = 9de971efd8647673a32185dbfc5a5ec2bc294c72 +SHA1 (patch-ai) = 5d7fee67d031eac8b9796d58a8783412df3ac639 +SHA1 (patch-aj) = a6949e266c9b65289d84b7e973481350f4b786aa diff --git a/games/openttd/patches/patch-ac b/games/openttd/patches/patch-ac new file mode 100644 index 00000000000..ea6fb1ae6d6 --- /dev/null +++ b/games/openttd/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.3 2005/09/11 11:44:29 adrianp Exp $ + +--- console_cmds.c.orig 2005-05-20 18:59:24.000000000 +0100 ++++ console_cmds.c +@@ -1101,7 +1101,7 @@ DEF_CONSOLE_HOOK(ConProcPlayerName) + SEND_COMMAND(PACKET_CLIENT_SET_NAME)(_network_player_name); + } else { + if (NetworkFindName(_network_player_name)) { +- NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, _network_player_name); ++ NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, "%s", _network_player_name); + ttd_strlcpy(ci->client_name, _network_player_name, sizeof(ci->client_name)); + NetworkUpdateClientInfo(NETWORK_SERVER_INDEX); + } diff --git a/games/openttd/patches/patch-ad b/games/openttd/patches/patch-ad new file mode 100644 index 00000000000..90076115f5a --- /dev/null +++ b/games/openttd/patches/patch-ad @@ -0,0 +1,22 @@ +$NetBSD: patch-ad,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- network.c.orig 2005-05-17 17:01:19.000000000 +0100 ++++ network.c +@@ -96,7 +96,7 @@ void CDECL NetworkTextMessage(NetworkAct + StringID TempStr = STR_NULL; + + va_start(va, str); +- vsprintf(buf, str, va); ++ vsnprintf(buf, lengthof(buf), str, va); + va_end(va); + + switch (action) { +@@ -507,7 +507,7 @@ void NetworkCloseClient(NetworkClientSta + + GetString(str, STR_NETWORK_ERR_CLIENT_GENERAL + errorno); + +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str); + + // Inform other clients of this... strange leaving ;) + FOR_ALL_CLIENTS(new_cs) { diff --git a/games/openttd/patches/patch-ae b/games/openttd/patches/patch-ae new file mode 100644 index 00000000000..413b35f541e --- /dev/null +++ b/games/openttd/patches/patch-ae @@ -0,0 +1,36 @@ +$NetBSD: patch-ae,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- network_client.c.orig 2005-05-15 19:50:55.000000000 +0100 ++++ network_client.c +@@ -344,7 +344,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER + if (ci != NULL) { + if (playas == ci->client_playas && strcmp(name, ci->client_name) != 0) { + // Client name changed, display the change +- NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, name); ++ NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, "%s", name); + } else if (playas != ci->client_playas) { + // The player changed from client-player.. + // Do not display that for now +@@ -665,7 +665,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER + + ci = NetworkFindClientInfoFromIndex(index); + if (ci != NULL) { +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, ci->client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, ci->client_name, "%s", str); + + // The client is gone, give the NetworkClientInfo free + ci->client_index = NETWORK_EMPTY_INDEX; +@@ -683,11 +683,11 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER + NetworkClientInfo *ci; + + index = NetworkRecv_uint16(MY_CLIENT, p); +- NetworkRecv_string(MY_CLIENT, p, str, 100); ++ NetworkRecv_string(MY_CLIENT, p, str, lengthof(str)); + + ci = NetworkFindClientInfoFromIndex(index); + if (ci != NULL) { +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, ci->client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, ci->client_name, "%s", str); + + // The client is gone, give the NetworkClientInfo free + ci->client_index = NETWORK_EMPTY_INDEX; diff --git a/games/openttd/patches/patch-af b/games/openttd/patches/patch-af new file mode 100644 index 00000000000..5722ca98192 --- /dev/null +++ b/games/openttd/patches/patch-af @@ -0,0 +1,45 @@ +$NetBSD: patch-af,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- network_server.c.orig 2005-05-17 19:22:59.000000000 +0100 ++++ network_server.c +@@ -159,7 +159,7 @@ DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SER + + DEBUG(net, 2)("[NET] %s made an error (%s) and his connection is closed", client_name, str); + +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str); + + FOR_ALL_CLIENTS(new_cs) { + if (new_cs->status > STATUS_AUTH && new_cs != cs) { +@@ -907,7 +907,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT + + DEBUG(net, 2)("[NET] %s reported an error and is closing his connection (%s)", client_name, str); + +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str); + + FOR_ALL_CLIENTS(new_cs) { + if (new_cs->status > STATUS_AUTH) { +@@ -932,11 +932,11 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT + return; + } + +- NetworkRecv_string(cs, p, str, 100); ++ NetworkRecv_string(cs, p, str, lengthof(str)); + + NetworkGetClientName(client_name, sizeof(client_name), cs); + +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str); + + FOR_ALL_CLIENTS(new_cs) { + if (new_cs->status > STATUS_AUTH) { +@@ -1111,7 +1111,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT + if (ci != NULL) { + // Display change + if (NetworkFindName(client_name)) { +- NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, client_name); ++ NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, "%s", client_name); + ttd_strlcpy(ci->client_name, client_name, sizeof(ci->client_name)); + NetworkUpdateClientInfo(ci->client_index); + } diff --git a/games/openttd/patches/patch-ag b/games/openttd/patches/patch-ag new file mode 100644 index 00000000000..4e5eb2be992 --- /dev/null +++ b/games/openttd/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- os2.c.orig 2005-05-15 15:01:35.000000000 +0100 ++++ os2.c +@@ -642,7 +642,7 @@ static long CDECL MidiSendCommand(const + va_list va; + char buf[512]; + va_start(va, cmd); +- vsprintf(buf, cmd, va); ++ vsnprintf(buf, sizeof(buf), cmd, va); + va_end(va); + return mciSendString(buf, NULL, 0, NULL, 0); + } diff --git a/games/openttd/patches/patch-ah b/games/openttd/patches/patch-ah new file mode 100644 index 00000000000..8fe8451fa6f --- /dev/null +++ b/games/openttd/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- texteff.c.orig 2005-03-28 13:38:02.000000000 +0100 ++++ texteff.c +@@ -57,7 +57,7 @@ void CDECL AddTextMessage(uint16 color, + int length; + + va_start(va, message); +- vsprintf(buf, message, va); ++ vsnprintf(buf, lengthof(buf), message, va); + va_end(va); + + /* Special color magic */ diff --git a/games/openttd/patches/patch-ai b/games/openttd/patches/patch-ai new file mode 100644 index 00000000000..35e64a32ca9 --- /dev/null +++ b/games/openttd/patches/patch-ai @@ -0,0 +1,31 @@ +$NetBSD: patch-ai,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- ttd.c.orig 2005-05-16 17:19:32.000000000 +0100 ++++ ttd.c +@@ -70,7 +70,7 @@ void CDECL error(const char *s, ...) { + va_list va; + char buf[512]; + va_start(va, s); +- vsprintf(buf, s, va); ++ vsnprintf(buf, sizeof(buf), s, va); + va_end(va); + + ShowOSErrorBox(buf); +@@ -86,7 +86,7 @@ void CDECL ShowInfoF(const char *str, .. + va_list va; + char buf[1024]; + va_start(va, str); +- vsprintf(buf, str, va); ++ vsnprintf(buf, sizeof(buf), str, va); + va_end(va); + ShowInfo(buf); + } +@@ -99,7 +99,7 @@ char * CDECL str_fmt(const char *str, .. + char *p; + + va_start(va, str); +- len = vsprintf(buf, str, va); ++ len = vsnprintf(buf, sizeof(buf), str, va); + va_end(va); + p = malloc(len + 1); + if (p) diff --git a/games/openttd/patches/patch-aj b/games/openttd/patches/patch-aj new file mode 100644 index 00000000000..50ee4aaa05e --- /dev/null +++ b/games/openttd/patches/patch-aj @@ -0,0 +1,13 @@ +$NetBSD: patch-aj,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- win32.c.orig 2005-05-16 17:19:32.000000000 +0100 ++++ win32.c +@@ -841,7 +841,7 @@ static long CDECL MidiSendCommand(const + char buf[512]; + + va_start(va, cmd); +- vsprintf(buf, cmd, va); ++ vsnprintf(buf, sizeof(buf), cmd, va); + va_end(va); + return mciSendStringA(buf, NULL, 0, 0); + } |