msvcrt: Old versions of _vsnprintf() treat the size as a signed int.
commitc2404ba333abd08054084285191f22eba5c9f7fc
authorFrancois Gouget <fgouget@codeweavers.com>
Thu, 20 Feb 2020 18:27:49 +0000 (20 19:27 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 20 Feb 2020 23:55:44 +0000 (21 00:55 +0100)
treec5ee465934f78c0928139eca7f4c9e5d0ad525e4
parent7df0f4a1da5a9f6406f06bc6fecb0acfbe508a9d
msvcrt: Old versions of _vsnprintf() treat the size as a signed int.

When they see -1 they consider that the buffer is too small and return
an error. So impose a 2 GB limit on sprintf() for backward
compatibility with XP and 2003.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
include/msvcrt/stdio.h