about summary refs log tree commit diff
path: root/sunrpc/xdr_ref.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-05-05 16:18:45 +0000
committerUlrich Drepper <drepper@redhat.com>2006-05-05 16:18:45 +0000
commitcdb9c32138fe80cc4767b5c597713cf773e12f0e (patch)
treee57fee5bcb50042464adb7d4331e46359d04e96f /sunrpc/xdr_ref.c
parentfff04b32afcf55edd678f7635a70f8918c4a0bd9 (diff)
downloadglibc-cdb9c32138fe80cc4767b5c597713cf773e12f0e.tar.gz
glibc-cdb9c32138fe80cc4767b5c597713cf773e12f0e.tar.xz
glibc-cdb9c32138fe80cc4767b5c597713cf773e12f0e.zip
* sunrpc/svcauth_des.c (cache_init): Use calloc instead of
	malloc&bzero.

	* sunrpc/svc_udp.c (BZERO): Remove definition.
	(CALLOC): Define.
	(svc_enablecache): Use CALLOC instead of ALLOC&BZERO.

	* sunrpc/des_impl.c: Remove ALT_ECB support.  We never used it.
	(des_SPtrans): Use uint32_t type.
	(des_skb): Likewise.

	* sunrpc/xdr_ref.c (xdr_reference): Use calloc instead of malloc&bzero.

	place where the iso639 array might be accessed beyond the limits.
Diffstat (limited to 'sunrpc/xdr_ref.c')
-rw-r--r--sunrpc/xdr_ref.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c
index 961c82edd2..bc5f72d6a6 100644
--- a/sunrpc/xdr_ref.c
+++ b/sunrpc/xdr_ref.c
@@ -79,14 +79,13 @@ xdr_reference (xdrs, pp, size, proc)
 	return TRUE;
 
       case XDR_DECODE:
-	*pp = loc = (caddr_t) mem_alloc (size);
+	*pp = loc = (caddr_t) calloc (1, size);
 	if (loc == NULL)
 	  {
 	    (void) __fxprintf (NULL, "%s",
 			       _("xdr_reference: out of memory\n"));
 	    return FALSE;
 	  }
-	__bzero (loc, (int) size);
 	break;
       default:
 	break;