diff options
author | Andy Polyakov <appro@openssl.org> | 2015-02-21 13:51:56 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2015-03-14 18:24:58 +0100 |
commit | 94be83127b08dc3977d2c14304aa61208db048d0 (patch) | |
tree | 207d1ec4f8a708abb187f2340fed2490a22f2e1e /crypto | |
parent | be109b9eec79a90871e5deb7d6ede8c04f073884 (diff) |
Avoid reading an unused byte after the buffer
Other curves don't have this problem.
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 9fbbdd73c58c29dc46cc314f7165e45e6d43fd60)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ec/ecp_nistp224.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c index 9a59ef0c19..ed09f97ade 100644 --- a/crypto/ec/ecp_nistp224.c +++ b/crypto/ec/ecp_nistp224.c @@ -321,7 +321,7 @@ static void bin28_to_felem(felem out, const u8 in[28]) out[0] = *((const uint64_t *)(in)) & 0x00ffffffffffffff; out[1] = (*((const uint64_t *)(in + 7))) & 0x00ffffffffffffff; out[2] = (*((const uint64_t *)(in + 14))) & 0x00ffffffffffffff; - out[3] = (*((const uint64_t *)(in + 21))) & 0x00ffffffffffffff; + out[3] = (*((const uint64_t *)(in+20))) >> 8; } static void felem_to_bin28(u8 out[28], const felem in) |