]> git.sesse.net Git - vlc/commit
win32: fix %zu fixups - dont use mingw's vsnprintf
authorDavid Flynn <davidf@rd.bbc.co.uk>
Wed, 1 Apr 2009 21:40:02 +0000 (21:40 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 3 Apr 2009 10:11:01 +0000 (12:11 +0200)
commit151982aab503fa812cd4d6e830df34e78871c106
tree9ae144bb879feda59989805f573db65191c42beb
parentca5043b48dc0eb7fdeb80c0d1daed763e1966dd8
win32: fix %zu fixups - dont use mingw's vsnprintf

Traditionally, MSVCRT has provided vsnprintf as _vsnprintf;
to 'aid' portability/standards compliance, mingw provide a
static version of [v]snprintf that is buggy.

The bug manifests as %lx is treated as a 64bit argument not
32bit, ie consumes two 32bit parameters.  if a %s were to
follow a %lx, bad things can happen.

Solution: Be sure to use the MSVCRT version, at least it
behaves as expected

Additionally, make it a bit more obvious when vlc wrappers
are being called by other wrappers.

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
include/vlc_fixups.h