math/mpmont.c (mpmont_reduce): Segfault if Karatsuba product is short.
authorMark Wooding <mwooding@good.com>
Fri, 10 Apr 2015 14:19:25 +0000 (15:19 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 22 Apr 2015 09:56:05 +0000 (10:56 +0100)
commit366e9701239c19df85f4625025ba4e36027df644
tree9b69f5a053d4e27a4d76ee7c82b3b798d60e1a5d
parent8878e543e2f5555a1a56a73279de38baeb0684df
math/mpmont.c (mpmont_reduce): Segfault if Karatsuba product is short.

In the Karatsuba branch, it's possible (e.g., if the input is actually
zero) that the result is short.  A later `MP_LEN(d) - n' then underflows
causing general badness.  Make sure the result is actually long enough.
math/mpmont.c
math/t/mpmont