aboutsummaryrefslogtreecommitdiff
path: root/localedata
diff options
context:
space:
mode:
Diffstat (limited to 'localedata')
-rw-r--r--localedata/ChangeLog5
-rw-r--r--localedata/tests-mbwc/tst_strfmon.c6
-rw-r--r--localedata/tests-mbwc/tst_types.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index a7c876fb07..908f1761cd 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-14 Wolfram Gloger <wg@malloc.de>
+
+ * tests-mbwc/tst_types.h: Increase MONSIZE.
+ * tests-mbwc/tst_strfmon.c: Fail test if buffer too small.
+
2002-04-05 Jakub Jelinek <jakub@redhat.com>
* locales/ms_MY (day): Fix a typo.
diff --git a/localedata/tests-mbwc/tst_strfmon.c b/localedata/tests-mbwc/tst_strfmon.c
index 8413f2cc51..b6c13a3a5e 100644
--- a/localedata/tests-mbwc/tst_strfmon.c
+++ b/localedata/tests-mbwc/tst_strfmon.c
@@ -27,6 +27,12 @@ tst_strfmon (FILE * fp, int debug_flg)
fmt = TST_INPUT (strfmon).fmt;
val = TST_INPUT (strfmon).val;
memset (buf, 0, MONSIZE);
+ if (nbt > MONSIZE)
+ {
+ err_count++;
+ Result (C_FAILURE, S_STRFMON, CASE_3, "buffer too small in test");
+ continue;
+ }
TST_CLEAR_ERRNO;
ret = strfmon (buf, nbt, fmt, val, val, val);
diff --git a/localedata/tests-mbwc/tst_types.h b/localedata/tests-mbwc/tst_types.h
index 2bf5a4f079..3d18279411 100644
--- a/localedata/tests-mbwc/tst_types.h
+++ b/localedata/tests-mbwc/tst_types.h
@@ -19,7 +19,7 @@
#define MBSSIZE 24
#define WCSSIZE 12
#define MONFMTSIZE 16
-#define MONSIZE 32
+#define MONSIZE 64
#define USE_MBCURMAX 99 /* well, but ... */
#define TST_DBL_EPS 2.22153e-16
#define WCSTOK_SEQNUM 3