aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--locale/programs/ld-address.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fe612a80b9..8e784b8fd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2017-01-11 Joseph Myers <joseph@codesourcery.com>
+ * locale/programs/ld-address.c (INT_STR_ELEM): Increase size of
+ buffer used to print long int value.
+
* elf/sotruss-lib.c (init): Increase space allocated for pid by
one byte. Print it with %ld, cast to long int.
diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c
index 3c13e68af3..2488a5ce5c 100644
--- a/locale/programs/ld-address.c
+++ b/locale/programs/ld-address.c
@@ -485,8 +485,8 @@ address_read (struct linereader *ldfile, struct localedef_t *result,
address->cat = arg->val.str.startmb; \
else \
{ \
- char *numbuf = (char *) xmalloc (11); \
- snprintf (numbuf, 11, "%ld", arg->val.num); \
+ char *numbuf = (char *) xmalloc (21); \
+ snprintf (numbuf, 21, "%ld", arg->val.num); \
address->cat = numbuf; \
} \
} \