summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfwprintf.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2009-02-28 04:58:18 +0000
committerdas <das@FreeBSD.org>2009-02-28 04:58:18 +0000
commit8f720cc6670287f3dc8e001fd7373042cb85e875 (patch)
treec6a4ad3e40ffcac2f78ac97d44380a78e031021d /lib/libc/stdio/vfwprintf.c
parentddd5c68e843d2a001ea8e2dea8a1df60e8b9c96f (diff)
downloadFreeBSD-src-8f720cc6670287f3dc8e001fd7373042cb85e875.zip
FreeBSD-src-8f720cc6670287f3dc8e001fd7373042cb85e875.tar.gz
Make sure %zd treats negative arguments properly on 32-bit platforms.
Fix harmless but related bugs in %_$zd and %_$tu. PR: 131880 MFC after: 1 week
Diffstat (limited to 'lib/libc/stdio/vfwprintf.c')
-rw-r--r--lib/libc/stdio/vfwprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c
index 054299a..2aa4972 100644
--- a/lib/libc/stdio/vfwprintf.c
+++ b/lib/libc/stdio/vfwprintf.c
@@ -479,7 +479,7 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap)
#define INTMAX_SIZE (INTMAXT|SIZET|PTRDIFFT|LLONGINT)
#define SJARG() \
(flags&INTMAXT ? GETARG(intmax_t) : \
- flags&SIZET ? (intmax_t)GETARG(size_t) : \
+ flags&SIZET ? (intmax_t)GETARG(ssize_t) : \
flags&PTRDIFFT ? (intmax_t)GETARG(ptrdiff_t) : \
(intmax_t)GETARG(long long))
#define UJARG() \
OpenPOWER on IntegriCloud