diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-05-02 08:16:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-05-02 08:16:34 +0000 |
commit | 57433edee3c08b16967487664a28e0ecc99d7f8c (patch) | |
tree | 5d766087a3661884bfc01b93dc8c7f44ab645ad7 /stdio-common | |
parent | 1cb04337f2f373b5ebc6a83d254add05f850ebe1 (diff) | |
download | glibc-57433edee3c08b16967487664a28e0ecc99d7f8c.tar.gz glibc-57433edee3c08b16967487664a28e0ecc99d7f8c.tar.xz glibc-57433edee3c08b16967487664a28e0ecc99d7f8c.zip |
* stdio-common/vfprintf.c (process_string_arg): Use a VLA rather than
fixed length array for ignore.
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/vfprintf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index 31bc523025..20c07ce73a 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -1162,7 +1162,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* In case we have a multibyte character set the \ situation is more complicated. We must not copy \ bytes at the end which form an incomplete character. */\ - wchar_t ignore[1024]; \ + size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\ + wchar_t ignore[ignore_size]; \ const char *str2 = string; \ const char *strend = string + prec; \ if (strend < string) \ |