mini-gmp

Zimmermann Paul Paul.Zimmermann at inria.fr
Thu Jan 16 19:24:02 UTC 2014


       Hi,

I found a bug in mini-gmp: the GMP _mpz_realloc function is defined as
mpz_realloc in mini-gmp (without the _ prefix):

static void *
mpz_realloc (mpz_t r, mp_size_t size)
{
  size = GMP_MAX (size, 1);

  r->_mp_d = gmp_xrealloc_limbs (r->_mp_d, size);
  r->_mp_alloc = size;

  if (GMP_ABS (r->_mp_size) > size)
    r->_mp_size = 0;

  return r->_mp_d;
}

Paul


More information about the gmp-bugs mailing list