aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-06-29 09:34:22 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-06-29 09:34:22 +0200
commit08d01cae60aa3966ed21e6ec70bbe9fef730e012 (patch)
treed4a2a9c3e844e945c2fe9a1f071992270c398438
parentc11cfe8d7c1e219fa8c819187d8b030ce3b4e947 (diff)
downloadglibc-08d01cae60aa3966ed21e6ec70bbe9fef730e012.tar
glibc-08d01cae60aa3966ed21e6ec70bbe9fef730e012.tar.gz
glibc-08d01cae60aa3966ed21e6ec70bbe9fef730e012.tar.bz2
glibc-08d01cae60aa3966ed21e6ec70bbe9fef730e012.zip
vfprintf: Reduce WORK_BUFFER_SIZE for wchar_t builds
-rw-r--r--ChangeLog5
-rw-r--r--stdio-common/vfprintf.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e2cc4678f..db0c4ad37e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2017-06-29 Florian Weimer <fweimer@redhat.com>
+ * stdio-common/vfprintf.c (WORK_BUFFER_SIZE): Reduce size for
+ wchar_t builds.
+
+2017-06-29 Florian Weimer <fweimer@redhat.com>
+
* stdio-common/tst-vfprintf-mbs-prec.c: New file.
* stdio-common/Makefile (tests): Add tst-vfprintf-mbs-prec.
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index b8c87a539f..4e22c75aa5 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -205,7 +205,7 @@ typedef wchar_t THOUSANDS_SEP_T;
static const CHAR_T null[] = L_("(null)");
/* Size of the work_buffer variable (in characters, not bytes. */
-enum { WORK_BUFFER_SIZE = 1000 };
+enum { WORK_BUFFER_SIZE = 1000 / sizeof (CHAR_T) };
/* This table maps a character into a number representing a class. In
each step there is a destination label for each class. */