]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
One more defensive assert, just to be sure.
authorSimon Tatham <anakin@pobox.com>
Tue, 6 Aug 2013 16:45:49 +0000 (16:45 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 6 Aug 2013 16:45:49 +0000 (16:45 +0000)
[originally from svn r9997]

sshbn.c

diff --git a/sshbn.c b/sshbn.c
index 1c5c46a1eb8746862e6b5cf45e63cbaa3b9c5ced..a5e0552ff57523002adbafa6502cb0beda792a97 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;