about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-04-16 23:02:04 +0000
committerJakub Jelinek <jakub@redhat.com>2007-04-16 23:02:04 +0000
commit07358add7496f187be585c8d44434eb757b68bb7 (patch)
tree98ac543a5394ee06bb56ea3155fc80237ec408f0
parent7a82b74f17a5fafe128d0a9bb8b2eabf4db746c7 (diff)
downloadglibc-07358add7496f187be585c8d44434eb757b68bb7.tar.gz
glibc-07358add7496f187be585c8d44434eb757b68bb7.tar.xz
glibc-07358add7496f187be585c8d44434eb757b68bb7.zip
* locale/programs/locarchive.c (show_archive_content): Fix sizeof
argument in xmalloc size computation.
2007-04-16  Jakub Jelinek  <jakub@redhat.com>

	* locale/programs/locarchive.c (show_archive_content): Fix sizeof
	argument in xmalloc size computation.
-rw-r--r--ChangeLog5
-rw-r--r--locale/programs/locarchive.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fed20cef1c..6d57e631f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* locale/programs/locarchive.c (show_archive_content): Fix sizeof
+	argument in xmalloc size computation.
+
 2007-04-01  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Use
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index 5c0d5f18ce..40756951a6 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -1428,7 +1428,7 @@ show_archive_content (int verbose)
       int sumused;
 
       files = (struct dataent *) xmalloc (head->sumhash_used
-					  * sizeof (struct sumhashent));
+					  * sizeof (struct dataent));
 
       sumhashtab = (struct sumhashent *) ((char *) ah.addr
 					  + head->sumhash_offset);