return 1 more for the trailing \0 when using vsnprintf. (#69474)

2002-01-23  Laszlo Peter  <laca@ireland.sun.com>

	* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
        for the trailing \0 when using vsnprintf. (#69474)
This commit is contained in:
Laszlo Peter 2002-01-23 19:38:24 +00:00 committed by László PÉTER
parent d16e73251f
commit 98a36f8237
9 changed files with 41 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1,3 +1,8 @@
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing '\0' when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi> 2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even * glib/gconvert.c: (strdup_len): Not used on Windows, don't even

View File

@ -1181,7 +1181,7 @@ g_printf_string_upper_bound (const gchar *format,
{ {
#if HAVE_C99_VSNPRINTF #if HAVE_C99_VSNPRINTF
gchar c; gchar c;
return vsnprintf (&c, 1, format, args); return vsnprintf (&c, 1, format, args) + 1;
#else #else
return printf_string_upper_bound (format, TRUE, args); return printf_string_upper_bound (format, TRUE, args);
#endif #endif