projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
crypto: sm3 - fix undefined shift by >= width of value
[linux-2.6-microblaze.git]
/
crypto
/
sm3_generic.c
diff --git
a/crypto/sm3_generic.c
b/crypto/sm3_generic.c
index
9a5c60f
..
c0cf87a
100644
(file)
--- a/
crypto/sm3_generic.c
+++ b/
crypto/sm3_generic.c
@@
-100,7
+100,7
@@
static void sm3_compress(u32 *w, u32 *wt, u32 *m)
for (i = 0; i <= 63; i++) {
- ss1 = rol32((rol32(a, 12) + e + rol32(t(i), i)), 7);
+ ss1 = rol32((rol32(a, 12) + e + rol32(t(i), i
& 31
)), 7);
ss2 = ss1 ^ rol32(a, 12);