From: Ulrich Drepper Date: Wed, 28 Jan 2009 20:04:49 +0000 (+0000) Subject: [BZ #9741] X-Git-Tag: upstream/2.30~13870 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5627534a81943eb4317651bb8d2daa6d93accd25;p=external%2Fglibc.git [BZ #9741] 2009-01-28 Ulrich Drepper [BZ #9741] * nscd/mem.c (gc): Fix assignment of he_data in case malloc is used. Reported by Jun'ichi Nomura . --- diff --git a/ChangeLog b/ChangeLog index cbcb3b7..df49905 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-28 Ulrich Drepper + + [BZ #9741] + * nscd/mem.c (gc): Fix assignment of he_data in case malloc is used. + Reported by Jun'ichi Nomura . + 2009-01-14 Kaz Kojima * sysdeps/unix/sysv/linux/sh/sysdep.h (INTERNAL_SYSCALL): diff --git a/nscd/mem.c b/nscd/mem.c index e821729..5f4c4dd 100644 --- a/nscd/mem.c +++ b/nscd/mem.c @@ -1,5 +1,5 @@ /* Cache memory handling. - Copyright (C) 2004, 2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -163,7 +163,7 @@ gc (struct database_dyn *db) else { he = xmalloc (memory_needed); - he_data = &he[db->head->nentries * sizeof (struct hashentry *)]; + he_data = &he[db->head->nentries]; he_use_malloc = true; }