One more defensive assert, just to be sure.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 6 Aug 2013 16:45:49 +0000 (16:45 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 6 Aug 2013 16:45:49 +0000 (16:45 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@9997 cda61777-01e9-0310-a592-d414129be87e

sshbn.c

diff --git a/sshbn.c b/sshbn.c
index 1c5c46a..a5e0552 100644 (file)
--- a/sshbn.c
+++ b/sshbn.c
@@ -607,6 +607,7 @@ static void internal_add_shifted(BignumInt *number,
     addend = (BignumDblInt)n << bshift;
 
     while (addend) {
+        assert(word <= number[0]);
        addend += number[word];
        number[word] = (BignumInt) addend & BIGNUM_INT_MASK;
        addend >>= BIGNUM_INT_BITS;