mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-24 14:41:06 +08:00
(_nss_db_getaliasent_r): Don't include terminating null in key size.
This commit is contained in:
parent
bc043c8881
commit
0602dc71bc
@ -1,5 +1,5 @@
|
||||
/* Mail alias file parser in nss_db module.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -220,13 +220,13 @@ lookup (const DBT *key, struct aliasent *result, char *buffer,
|
||||
enum nss_status
|
||||
_nss_db_getaliasent_r (struct aliasent *result, char *buffer, size_t buflen)
|
||||
{
|
||||
/* Return next entry in host file. */
|
||||
/* Return next entry in alias file. */
|
||||
enum nss_status status;
|
||||
char buf[20];
|
||||
DBT key;
|
||||
|
||||
__libc_lock_lock (lock);
|
||||
key.size = 1 + snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
|
||||
key.size = snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
|
||||
status = lookup (&key, result, buffer, buflen);
|
||||
__libc_lock_unlock (lock);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user