mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 22:59:16 +02:00
Fix crash when printing large 64-bit values on Win32 using the %I64x
2006-08-20 Tor Lillqvist <tml@novell.com> * glib/gnulib/vasnprintf.c (vasnprintf): Fix crash when printing large 64-bit values on Win32 using the %I64x format. (#351034, Neil Piercy)
This commit is contained in:
parent
1b60e2744a
commit
0d37c815d9
@ -1,3 +1,9 @@
|
|||||||
|
2006-08-20 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* glib/gnulib/vasnprintf.c (vasnprintf): Fix crash when printing
|
||||||
|
large 64-bit values on Win32 using the %I64x format. (#351034,
|
||||||
|
Neil Piercy)
|
||||||
|
|
||||||
Wed Aug 16 13:59:07 2006 Tim Janik <timj@gtk.org>
|
Wed Aug 16 13:59:07 2006 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* tests/gobject/Makefile.am:
|
* tests/gobject/Makefile.am:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2006-08-20 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* glib/gnulib/vasnprintf.c (vasnprintf): Fix crash when printing
|
||||||
|
large 64-bit values on Win32 using the %I64x format. (#351034,
|
||||||
|
Neil Piercy)
|
||||||
|
|
||||||
Wed Aug 16 13:59:07 2006 Tim Janik <timj@gtk.org>
|
Wed Aug 16 13:59:07 2006 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* tests/gobject/Makefile.am:
|
* tests/gobject/Makefile.am:
|
||||||
|
@ -479,6 +479,16 @@ vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
|
|||||||
+ 1 /* turn floor into ceil */
|
+ 1 /* turn floor into ceil */
|
||||||
+ 2; /* account for leading sign or alternate form */
|
+ 2; /* account for leading sign or alternate form */
|
||||||
else
|
else
|
||||||
|
# endif
|
||||||
|
# ifdef HAVE_INT64_AND_I64
|
||||||
|
if (type == TYPE_INT64 || type == TYPE_UINT64)
|
||||||
|
tmp_length =
|
||||||
|
(unsigned int) (sizeof (unsigned __int64) * CHAR_BIT
|
||||||
|
* 0.25 /* binary -> hexadecimal */
|
||||||
|
)
|
||||||
|
+ 1 /* turn floor into ceil */
|
||||||
|
+ 2; /* account for leading sign or alternate form */
|
||||||
|
else
|
||||||
# endif
|
# endif
|
||||||
if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
|
if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
|
||||||
tmp_length =
|
tmp_length =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user