diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-24 07:10:21 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-24 07:10:21 +0000 |
commit | ee82b3c89f1068abf531d1d5168d231b7539bca9 (patch) | |
tree | 0c953b33c310d64d89c3495786e35f291d5e8126 /tests/tprintf.c | |
parent | def23de32451d0801b57d93da2ddc57d6ada69b4 (diff) | |
download | mpfr-ee82b3c89f1068abf531d1d5168d231b7539bca9.tar.gz |
[src/vasprintf.c] Fixed the handling of the 'n' format specifier
for size = 0, still allowing its support in case of overflow on
the return value (i.e. when the number of characters that would
have been output is > INT_MAX).
Note: full support in case of overflow is still limited by GMP
and the C library.
[tests/tprintf.c] Increased the memory needed in check_long_string().
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11523 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tprintf.c')
-rw-r--r-- | tests/tprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/tprintf.c b/tests/tprintf.c index 7767a9052..8130266d0 100644 --- a/tests/tprintf.c +++ b/tests/tprintf.c @@ -142,10 +142,10 @@ check_long_string (void) increase is necessary, but is not guaranteed to be sufficient in all cases (e.g. with logging activated). */ min_memory_limit = large_prec / MPFR_BYTES_PER_MP_LIMB; - if (min_memory_limit > (size_t) -1 / 12) + if (min_memory_limit > (size_t) -1 / 32) min_memory_limit = (size_t) -1; else - min_memory_limit *= 12; + min_memory_limit *= 32; if (tests_memory_limit > 0 && tests_memory_limit < min_memory_limit) tests_memory_limit = min_memory_limit; |