diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-11-29 02:25:19 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-11-29 02:25:19 +0000 |
commit | 4b2706cb2f16227e74aa0323b4877afb10d361d4 (patch) | |
tree | b4f18ff1a520054c957e90f3366460695db8b6de /src/fpif.c | |
parent | 08750c5dabf4983720a96cb000d0608464b0c5bc (diff) | |
download | mpfr-4b2706cb2f16227e74aa0323b4877afb10d361d4.tar.gz |
[src/fpif.c] For mpfr_fpif_import, replaced an assertion by a failure
(since the full format is not described in the manual and MPFR cannot
currently generate such a case, this is OK).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11857 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/fpif.c')
-rw-r--r-- | src/fpif.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fpif.c b/src/fpif.c index fc81dfeaf..0c5553ea7 100644 --- a/src/fpif.c +++ b/src/fpif.c @@ -390,11 +390,11 @@ mpfr_fpif_read_exponent_from_file (mpfr_t x, FILE * fh) mpfr_uexp_t exponent_sign; exponent_size = exponent - MPFR_EXTERNAL_EXPONENT; - MPFR_ASSERTN (exponent_size <= 16); /* see TODO */ /* FIXME: allow the exponent to have leading zeros, though this - is not the shorter encoding. */ - if (MPFR_UNLIKELY (exponent_size > sizeof(mpfr_exp_t))) + is not the shortest encoding. */ + if (MPFR_UNLIKELY (exponent_size > 16 /* see TODO */ || + exponent_size > sizeof(mpfr_exp_t))) return 1; if (MPFR_UNLIKELY (fread (buffer, exponent_size, 1, fh) != 1)) |