diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 15:15:03 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 15:15:03 +0000 |
commit | 3a47d900471afccf2092598105e46a01c55724b9 (patch) | |
tree | 7ecf5f00f983d759885db23f9a07deead6d2be9c /stdio-common/test-vfprintf.c | |
parent | 6d4cde8a3d52cc674276f2c34bde05b77eb0eecd (diff) | |
download | glibc-3a47d900471afccf2092598105e46a01c55724b9.tar glibc-3a47d900471afccf2092598105e46a01c55724b9.tar.gz glibc-3a47d900471afccf2092598105e46a01c55724b9.tar.bz2 glibc-3a47d900471afccf2092598105e46a01c55724b9.zip |
2007-05-04 Ulrich Drepper <drepper@redhat.com>
* stdio-common/vfprintf.c (process_string_arg): Adjust call to
__mbsnrtowcs after last change.
2007-05-02 Jakub Jelinek <jakub@redhat.com>
* stdio-common/vfprintf.c (process_string_arg): Use a VLA rather than
fixed length array for ignore.
2007-04-30 Ulrich Drepper <drepper@redhat.com>
[BZ #4438]
* stdio-common/vfprintf.c (process_string_arg): Don't overflow the
stack for large precisions.
* stdio-common/test-vfprintf.c (main): Add test for large
precision.
Diffstat (limited to 'stdio-common/test-vfprintf.c')
-rw-r--r-- | stdio-common/test-vfprintf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/stdio-common/test-vfprintf.c b/stdio-common/test-vfprintf.c index a683eac779..a2f9c19ca2 100644 --- a/stdio-common/test-vfprintf.c +++ b/stdio-common/test-vfprintf.c @@ -94,6 +94,7 @@ main (void) fprintf (fp, "%.*s", 30000, large); large[20000] = '\0'; fprintf (fp, large); + fprintf (fp, "%-1.300000000s", "hello"); if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0) { @@ -108,11 +109,12 @@ main (void) setlocale (LC_ALL, NULL)); exit (1); } - else if (st.st_size != 99999) + else if (st.st_size != 50000 + 30000 + 19999 + 5) { printf ("file size incorrect for locale %s: %jd instead of %jd\n", setlocale (LC_ALL, NULL), - (intmax_t) st.st_size, (intmax_t) 99999); + (intmax_t) st.st_size, + (intmax_t) 50000 + 30000 + 19999 + 5); res = 1; } else |