diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-08-07 13:11:07 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-08-07 13:14:02 +0800 |
commit | 20f54e4906be00aa303a8df36f312c137182d1c6 (patch) | |
tree | 06d2617b021a303969e837ede00ffcad92908429 /source/fitz | |
parent | 9110e5d8f5ed4945c416ce6732f86bd16284d7ea (diff) | |
download | mupdf-20f54e4906be00aa303a8df36f312c137182d1c6.tar.xz |
Fix fz_vsnprintf() so it prints %zu.
Previously we might and up with prints such as:
error: malloc of array (%zu x %zu bytes) failed
because %zu was never interpreted on 32-bit platforms
where sizeof(size_t) < 8. After this fix we now get:
error: malloc of array (14445 x 118800 bytes) failed
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/printf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/fitz/printf.c b/source/fitz/printf.c index 8d6bfb0d..2246b4c9 100644 --- a/source/fitz/printf.c +++ b/source/fitz/printf.c @@ -197,6 +197,8 @@ fz_vsnprintf(char *buffer, size_t space, const char *fmt, va_list args) case 'z': if (sizeof(size_t) >= 8) length = 64; + else + length = 32; break; case 'Z': if (sizeof(fz_off_t) >= 8) |