pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/ufoai Dereferencing va_list is not portable and ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/99be8c0ae300
branches:  trunk
changeset: 649079:99be8c0ae300
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Mar 31 15:40:03 2015 +0000

description:
Dereferencing va_list is not portable and broken when using a
non-pointer type.

diffstat:

 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 deletions(-)

diffs (71 lines):

diff -r 3898a91f9b1d -r 99be8c0ae300 games/ufoai/distinfo
--- a/games/ufoai/distinfo      Tue Mar 31 15:39:07 2015 +0000
+++ b/games/ufoai/distinfo      Tue Mar 31 15:40:03 2015 +0000
@@ -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 @@
 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 -r 3898a91f9b1d -r 99be8c0ae300 games/ufoai/patches/patch-src_common_msg.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/ufoai/patches/patch-src_common_msg.c        Tue Mar 31 15:40:03 2015 +0000
@@ -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 -r 3898a91f9b1d -r 99be8c0ae300 games/ufoai/patches/patch-src_common_netpack.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/ufoai/patches/patch-src_common_netpack.c    Tue Mar 31 15:40:03 2015 +0000
@@ -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!");
+ }
+ 
+ /**



Home | Main Index | Thread Index | Old Index