1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
2001-08-22  Jakub Jelinek  <jakub@redhat.com>

	* sunrpc/xdr_rec.c (xdrrec_create): Fix buf sizes before allocating
	buf.  Free resources on failure.
	* sunrpc/svc_unix.c (svcunix_create): Free resources on failure.
	(makefd_xprt): Likewise.
	* sunrpc/svc_udp.c (svcudp_bufcreate): Likewise.
	* sunrpc/svc_tcp.c (svctcp_create, makefd_xprt): Likewise.
	* sunrpc/auth_unix.c (authunix_create): Likewise.

2001-08-21  Jakub Jelinek  <jakub@redhat.com>

	* string/strnlen.c: Remove.
	* sysdeps/generic/strnlen.c: New.
	* sysdeps/i386/i486/bits/string.h (strnlen): Remove.
This commit is contained in:
Ulrich Drepper
2001-08-22 17:00:32 +00:00
parent 59adeb11a2
commit 2e3e5db668
9 changed files with 197 additions and 69 deletions

View File

@ -108,6 +108,7 @@ authunix_create (char *machname, uid_t uid, gid_t gid, int len,
au = (struct audata *) mem_alloc (sizeof (*au));
if (auth == NULL || au == NULL)
{
no_memory:
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
(void) __fwprintf (stderr, L"%s",
@ -115,6 +116,8 @@ authunix_create (char *machname, uid_t uid, gid_t gid, int len,
else
#endif
(void) fputs (_("authunix_create: out of memory\n"), stderr);
mem_free (auth, sizeof (*auth));
mem_free (au, sizeof (*au));
return NULL;
}
auth->ah_ops = &auth_unix_ops;
@ -143,16 +146,7 @@ authunix_create (char *machname, uid_t uid, gid_t gid, int len,
au->au_origcred.oa_flavor = AUTH_UNIX;
au->au_origcred.oa_base = mem_alloc ((u_int) len);
if (au->au_origcred.oa_base == NULL)
{
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
(void) __fwprintf (stderr, L"%s",
_("authunix_create: out of memory\n"));
else
#endif
(void) fputs (_("authunix_create: out of memory\n"), stderr);
return NULL;
}
goto no_memory;
memcpy(au->au_origcred.oa_base, mymem, (u_int) len);
/*