about summary refs log tree commit diff
path: root/locale/loadlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/loadlocale.c')
-rw-r--r--locale/loadlocale.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 54336c4c49..1478579c55 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -18,6 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdlib.h>
@@ -215,7 +216,11 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
 	  goto puntmap;
 	}
       if (__builtin_expect (_nl_value_types[category][cnt] == word, 0))
-	newdata->values[cnt].word = *((u_int32_t *) (newdata->filedata + idx));
+	{
+	  assert (idx % 4 == 0);
+	  newdata->values[cnt].word =
+	    *((u_int32_t *) (newdata->filedata + idx));
+	}
       else
 	newdata->values[cnt].string = newdata->filedata + idx;
     }