summaryrefslogtreecommitdiff
path: root/tests/tprintf.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-28 21:19:11 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-28 21:19:11 +0000
commit27686683b4dc9bc7469b0b74c29958f1b8c6135d (patch)
treec43676610d6cb1d48e770c70bd764f51758cf089 /tests/tprintf.c
parentb724807daf09b51c6ee6e1fec1ad93efcc337474 (diff)
downloadmpfr-27686683b4dc9bc7469b0b74c29958f1b8c6135d.tar.gz
[src/vasprintf.c] Fixed overflow checking in partition_number().
In details: * The computation of the number of characters to be written could be incorrect by 1 when the thousands separator was not empty. However, in the 3.1 branch (without additional patches), this value is currently only used for overflow checking, so that this bug could have only very little effect (contrary to the trunk). * When the int and long types have the same size, the code assumed "wrapping behavior in two's complement". But this is actually undefined behavior in ISO C; in practice, a smart compiler may have ignored "total < 0" tests, because total is computed with sums of non-negative integers. (merged changesets r11513,11515-11516 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11538 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tprintf.c')
0 files changed, 0 insertions, 0 deletions