From f4b698046d6b43122bf7fc59c141714e87cba184 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 31 Mar 2015 15:40:03 +0000 Subject: Dereferencing va_list is not portable and broken when using a non-pointer type. --- games/ufoai/distinfo | 4 +++- games/ufoai/patches/patch-src_common_msg.c | 24 ++++++++++++++++++++++++ games/ufoai/patches/patch-src_common_netpack.c | 24 ++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 games/ufoai/patches/patch-src_common_msg.c create mode 100644 games/ufoai/patches/patch-src_common_netpack.c (limited to 'games') diff --git a/games/ufoai/distinfo b/games/ufoai/distinfo index b836f1a59b6..e9f635a6761 100644 --- a/games/ufoai/distinfo +++ b/games/ufoai/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2011/04/05 11:32:46 wiz Exp $ +$NetBSD: distinfo,v 1.6 2015/03/31 15:40:03 joerg Exp $ SHA1 (ufoai-2.2.1-data.tar) = eb071333478bd6860179e12d8655301980f87d60 RMD160 (ufoai-2.2.1-data.tar) = af91dd473f59c73e705181759059bd37ba215f62 @@ -12,3 +12,5 @@ Size (ufoai-2.2.1-source.tar.bz2) = 7640531 bytes SHA1 (patch-aa) = 2b196e8d94a1848b42212f32c90a259e56440382 SHA1 (patch-ab) = 0d02436454b3dbd85b8027fcf321714be8bf05a2 SHA1 (patch-ac) = 29069a06c2442060734e32162a9b561c19be8739 +SHA1 (patch-src_common_msg.c) = 6554364b9bdfa1040f44240da362c5c68c6d98cb +SHA1 (patch-src_common_netpack.c) = 88fc5a66e1e9e9006b43df262190e5e1cfbfd734 diff --git a/games/ufoai/patches/patch-src_common_msg.c b/games/ufoai/patches/patch-src_common_msg.c new file mode 100644 index 00000000000..674fd0dc32f --- /dev/null +++ b/games/ufoai/patches/patch-src_common_msg.c @@ -0,0 +1,24 @@ +$NetBSD: patch-src_common_msg.c,v 1.1 2015/03/31 15:40:03 joerg Exp $ + +--- src/common/msg.c.orig 2015-03-26 15:32:50.000000000 +0000 ++++ src/common/msg.c +@@ -316,9 +316,6 @@ void MSG_V_WriteFormat (sizebuf_t * sb, + Com_Error(ERR_DROP, "WriteFormat: Unknown type!"); + } + } +- /* Too many arguments for the given format; too few cause crash above */ +- if (!ap) +- Com_Error(ERR_DROP, "WriteFormat: Too many arguments!"); + } + + /** +@@ -662,9 +659,6 @@ void MSG_V_ReadFormat (sizebuf_t * msg_r + Com_Error(ERR_DROP, "ReadFormat: Unknown type!"); + } + } +- /* Too many arguments for the given format; too few cause crash above */ +- if (!ap) +- Com_Error(ERR_DROP, "ReadFormat: Too many arguments!"); + } + + /** diff --git a/games/ufoai/patches/patch-src_common_netpack.c b/games/ufoai/patches/patch-src_common_netpack.c new file mode 100644 index 00000000000..262626ce590 --- /dev/null +++ b/games/ufoai/patches/patch-src_common_netpack.c @@ -0,0 +1,24 @@ +$NetBSD: patch-src_common_netpack.c,v 1.1 2015/03/31 15:40:03 joerg Exp $ + +--- src/common/netpack.c.orig 2015-03-26 15:39:22.000000000 +0000 ++++ src/common/netpack.c +@@ -189,9 +189,6 @@ void NET_V_WriteFormat (struct dbuffer * + Com_Error(ERR_DROP, "WriteFormat: Unknown type!"); + } + } +- /* Too many arguments for the given format; too few cause crash above */ +- if (!ap) +- Com_Error(ERR_DROP, "WriteFormat: Too many arguments!"); + } + + /** +@@ -470,9 +467,6 @@ void NET_V_ReadFormat (struct dbuffer *b + Com_Error(ERR_DROP, "ReadFormat: Unknown type!"); + } + } +- /* Too many arguments for the given format; too few cause crash above */ +- if (!ap) +- Com_Error(ERR_DROP, "ReadFormat: Too many arguments!"); + } + + /** -- cgit v1.2.3