Source-Changes-HG archive

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

[src/trunk]: src/include/rpc Make the RPC mem_alloc() macro use calloc() to p...



details:   https://anonhg.NetBSD.org/src/rev/6d9f775c8237
branches:  trunk
changeset: 487804:6d9f775c8237
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jun 13 01:02:44 2000 +0000

description:
Make the RPC mem_alloc() macro use calloc() to prevent RPC from
using only partially-initialized data structures.

diffstat:

 include/rpc/types.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 5583501ea2a2 -r 6d9f775c8237 include/rpc/types.h
--- a/include/rpc/types.h       Tue Jun 13 01:02:31 2000 +0000
+++ b/include/rpc/types.h       Tue Jun 13 01:02:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.12 2000/06/02 22:57:57 fvdl Exp $  */
+/*     $NetBSD: types.h,v 1.13 2000/06/13 01:02:44 thorpej Exp $       */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -62,7 +62,7 @@
 #      define NULL     0
 #endif
 
-#define mem_alloc(bsize)       malloc(bsize)
+#define mem_alloc(bsize)       calloc(1, bsize)
 #define mem_free(ptr, bsize)   free(ptr)
 
 #include <sys/time.h>



Home | Main Index | Thread Index | Old Index