about summary refs log tree commit diff
path: root/iconv/strtab.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-22 21:48:51 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-22 21:48:51 +0000
commit61c037249fe1e2bb62e596d47bd49e3b30e5ca32 (patch)
treee4f50bb37f6224cab5232f11efd438143c6a7df8 /iconv/strtab.c
parent874d84617d64a4e6f28c977f87ff7d3b9ca1d5bb (diff)
downloadglibc-61c037249fe1e2bb62e596d47bd49e3b30e5ca32.tar.gz
glibc-61c037249fe1e2bb62e596d47bd49e3b30e5ca32.tar.xz
glibc-61c037249fe1e2bb62e596d47bd49e3b30e5ca32.zip
Update.
2001-07-22  Ulrich Drepper  <drepper@redhat.com>

	* iconv/strtab.c (morememory): Fix little memory handling problem.
Diffstat (limited to 'iconv/strtab.c')
-rw-r--r--iconv/strtab.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/iconv/strtab.c b/iconv/strtab.c
index 5b3e3283e9..be79dc29ed 100644
--- a/iconv/strtab.c
+++ b/iconv/strtab.c
@@ -22,6 +22,7 @@
 
 #include <assert.h>
 #include <inttypes.h>
+#include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -72,7 +73,7 @@ strtabinit (void)
 {
   if (ps == 0)
     {
-      ps = sysconf (_SC_PAGESIZE) - 2 * sizeof (void);
+      ps = sysconf (_SC_PAGESIZE) - 2 * sizeof (void *);
       assert (sizeof (struct memoryblock) < ps);
     }
 
@@ -94,7 +95,7 @@ morememory (struct Strtab *st, size_t len)
   newmem->next = st->memory;
   st->memory = newmem;
   st->backp = newmem->memory;
-  st->left = len;
+  st->left = len - offsetof (struct memoryblock, memory);
 }