]> granicus.if.org Git - openssl/commit
This rewrites two "for" loops in BN_rshift() - equality with zero is
authorGeoff Thorpe <geoff@openssl.org>
Thu, 13 Nov 2003 15:03:14 +0000 (15:03 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Thu, 13 Nov 2003 15:03:14 +0000 (15:03 +0000)
commit9dde17e8b43980d193dd7c117edeca9c602c41ab
treed1b95e748c22019dbb40c57c3fb077dbb17ee2b7
parent37af03d3117cc1db061594019f351fcec5b08a8a
This rewrites two "for" loops in BN_rshift() - equality with zero is
generally a more efficient comparison than comparing two integers, and the
first of these two loops was off-by-one (copying one too many values). This
change also removes a superfluous assignment that would set an unused word
to zero (and potentially allow an overrun in some cases).

Submitted by: Nils Larsch
Reviewed by: Geoff Thorpe
crypto/bn/bn_shift.c