out-of-bound write

Vincent Lefevre vincent at vinc17.net
Tue Dec 17 22:34:47 UTC 2013


On 2013-12-17 20:05:47 +0100, Torbjorn Granlund wrote:
> The area at @var{rp} has to have space for the largest possible number
> represented by a number number with @var{strsize} digits in the chosen base,
                   ^^^^^^^^^^^^^
> plus one extra limb.
> 
> The return value is the number of valid limbs written to @var{rp}.  If the input
> string had no leading zeros, the value at rp will also have no leading zeros.
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Is this true? In Paul's example (16 Dec 2013 17:52:52 +0100),
str has no leading zeros, but the byte after the most significant
non-zero byte of rp has been set to 0.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list