summary refs log tree commit diff
path: root/stdio-common/bug22.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-12-10 01:43:40 +0000
committerUlrich Drepper <drepper@redhat.com>2007-12-10 01:43:40 +0000
commitb4354cf42008f12cac246759b64db0439a82ce67 (patch)
treec5f15a5aae3d23cbc4a603bf07532aa85959c404 /stdio-common/bug22.c
parent87520cccf6207f0a3525b5a5d5dc2ffd80b3d416 (diff)
downloadglibc-b4354cf42008f12cac246759b64db0439a82ce67.tar.gz
glibc-b4354cf42008f12cac246759b64db0439a82ce67.tar.xz
glibc-b4354cf42008f12cac246759b64db0439a82ce67.zip
[BZ #5424, BZ #5428, BZ #5451]
2007-12-08  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5424]
	* stdio-common/vfprintf.c: Do not overflow when adding to done.
	* stdio-common/Makefile (tests): Add bug22.
	* stdio-common/bug22.c: New file.

	[BZ #5451]
	* time/getdate.c: Fix filling in default values.
	* time/bug-getdate1.c: New file.
	* time/Makefile: Add rules to build and run bug-getdate1.

	* iconvdata/ebcdic-is-friss.c: Use 8bit-gap instead of 8bit-generic.
	* iconvdata/ebcdic-es.c: Likewise.
	* iconvdata/ebcdic-es-a.c: Likewise.
	* iconvdata/ebcdic-uk.c: Likewise.
	* iconvdata/iso8859-16.c: Likewise.
	* iconvdata/viscii.c: Likewise.
	* iconvdata/iso8859-9e.c: Likewise.
	* iconvdata/Makefile: Adjust appropriately.

	[BZ #5428]
	* wcsmbs/wchar.h: Unconditionally undefine __need_mbstate and
	__need_wint_t.

	* iconvdata/gconv-modules: Likewise.
Diffstat (limited to 'stdio-common/bug22.c')
-rw-r--r--stdio-common/bug22.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/stdio-common/bug22.c b/stdio-common/bug22.c
new file mode 100644
index 0000000000..2228388b47
--- /dev/null
+++ b/stdio-common/bug22.c
@@ -0,0 +1,32 @@
+/* BZ #5424 */
+#include <stdio.h>
+
+#define N 2147483648
+
+#define STRINGIFY(S) #S
+#define MAKE_STR(S) STRINGIFY(S)
+
+#define SN MAKE_STR(N)
+
+static int
+do_test (void)
+{
+  int ret;
+
+  FILE *fp = fopen ("/dev/null", "w");
+  if (fp == NULL)
+    {
+      puts ("cannot open /dev/null");
+      return 1;
+    }
+
+  ret = fprintf (fp, "%" SN "d%" SN "d", 1, 1);
+
+  printf ("ret = %d\n", ret);
+
+  return ret != -1;
+}
+
+#define TIMEOUT 30
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"