From a1e54756a15b4f8924bf39298ed40c93ac18262d Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Sun, 24 Jan 2016 15:13:18 +0100 Subject: [PATCH] add an extra overflow check --- arb/bernoulli_poly_ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arb/bernoulli_poly_ui.c b/arb/bernoulli_poly_ui.c index 7116525e..8f3115ac 100644 --- a/arb/bernoulli_poly_ui.c +++ b/arb/bernoulli_poly_ui.c @@ -47,7 +47,7 @@ arb_bernoulli_poly_ui(arb_t res, ulong n, const arb_t x, slong prec) } /* small integer x */ - if (arb_is_int(x) && arf_cmpabs_ui(arb_midref(x), n) < 0) + if (arb_is_int(x) && arf_cmpabs_ui(arb_midref(x), n) < 0 && n < WORD_MAX) { if (arf_sgn(arb_midref(x)) >= 0) {