about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/locarchive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index c7aa5b06ac..abb6cd28e1 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -272,7 +272,10 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
   newhead.string_offset = (newhead.namehash_offset
 			   + (newhead.namehash_size
 			      * sizeof (struct namehashent)));
-  newhead.string_size = MAX (2 * newhead.string_used, newhead.string_size);
+  /* Keep the string table size aligned to 4 bytes, so that
+     all the struct { uint32_t } types following are happy.  */
+  newhead.string_size = MAX ((2 * newhead.string_used + 3) & -4,
+			     newhead.string_size);
 
   newhead.locrectab_offset = newhead.string_offset + newhead.string_size;
   newhead.locrectab_size = MAX (2 * newhead.locrectab_used,