mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
* crypt/md5-crypt.c (__md5_crypt_r): Compute used and required memory correctly.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2001-08-30 Ulrich Drepper <drepper@redhat.com>
|
2001-08-30 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* crypt/md5-crypt.c (__md5_crypt_r): Compute used and required
|
||||||
|
memory correctly.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/ia64/ioperm.c (_ioperm): Use __open
|
* sysdeps/unix/sysv/linux/ia64/ioperm.c (_ioperm): Use __open
|
||||||
instead of open, __close instead of close, __getpagesize instead
|
instead of open, __close instead of close, __getpagesize instead
|
||||||
of getpagesize.
|
of getpagesize.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* One way encryption based on MD5 sum.
|
/* One way encryption based on MD5 sum.
|
||||||
Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
@ -179,10 +179,10 @@ __md5_crypt_r (key, salt, buffer, buflen)
|
|||||||
/* Now we can construct the result string. It consists of three
|
/* Now we can construct the result string. It consists of three
|
||||||
parts. */
|
parts. */
|
||||||
cp = __stpncpy (buffer, md5_salt_prefix, MAX (0, buflen));
|
cp = __stpncpy (buffer, md5_salt_prefix, MAX (0, buflen));
|
||||||
buflen -= sizeof (md5_salt_prefix);
|
buflen -= sizeof (md5_salt_prefix) - 1;
|
||||||
|
|
||||||
cp = __stpncpy (cp, salt, MIN ((size_t) buflen, salt_len));
|
cp = __stpncpy (cp, salt, MIN ((size_t) MAX (0, buflen), salt_len));
|
||||||
buflen -= MIN ((size_t) buflen, salt_len);
|
buflen -= MIN ((size_t) MAX (0, buflen), salt_len);
|
||||||
|
|
||||||
if (buflen > 0)
|
if (buflen > 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user