[prev in list] [next in list] [prev in thread] [next in thread]
List: gmp-devel
Subject: overflow in mpz_sizeinbase
From: linus () nordberg ! se (Linus Nordberg)
Date: 2005-04-22 22:48:37
Message-ID: yszpswm3bsf.fsf () mingrillvagn ! nordberg ! se
[Download RAW message or body]
jweening@ccrwest.org (Joe Weening) wrote
Wed, 20 Apr 2005 17:25:22 -0700 (PDT):
| This causes the "size" argument of MPN_SIZEINBASE to be of type "int",
| and the computation
|
| __totbits = (size) * GMP_NUMB_BITS - (__cnt - GMP_NAIL_BITS); \
|
| in gmp-impl.h overflows when (size) * GMP_NUMB_BITS is 2^31 or more,
This problem is addressed in the gmp-impl.h.MPN_SIZEINBASE.diff [1]
patch, announced on the GMP pages under "Status of the current
release" [2].
Please keep bug reports on the gmp-bugs@swox.com. (My fault approving
this to the developers list. Sorry for that.)
[1] http://swox.com/gmp/patches/gmp-impl.h.MPN_SIZEINBASE.diff
[2] http://swox.com/gmp/#STATUS
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic