]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 22 Jul 2001 21:48:51 +0000 (21:48 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 22 Jul 2001 21:48:51 +0000 (21:48 +0000)
2001-07-22  Ulrich Drepper  <drepper@redhat.com>

* iconv/strtab.c (morememory): Fix little memory handling problem.

ChangeLog
iconv/strtab.c

index 32e12ac4cf72c7144e9d61cbc3d08f7e60e363f4..f0bd8d547a36b95bb765e525f0ee9c4a0f9ca45d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-07-22  Ulrich Drepper  <drepper@redhat.com>
+
+       * iconv/strtab.c (morememory): Fix little memory handling problem.
+
 2001-07-22  Andreas Schwab  <schwab@suse.de>
 
        * sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Don't
index 5b3e3283e935a27ca1aafa2bbf4be2dfe0540311..be79dc29ed97d7656922788ecf18344acc3493fe 100644 (file)
@@ -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);
 }