mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-22 15:39:07 +00:00
Fix too-large shift in mceliece*f
This commit is contained in:
parent
c5f8131c8b
commit
fcd81030d6
@ -57,7 +57,7 @@ static inline int ctz(uint64_t in) {
|
|||||||
int i, b, m = 0, r = 0;
|
int i, b, m = 0, r = 0;
|
||||||
|
|
||||||
for (i = 0; i < 64; i++) {
|
for (i = 0; i < 64; i++) {
|
||||||
b = ((int)in >> i) & 1;
|
b = ((int)(in >> i)) & 1;
|
||||||
m |= b;
|
m |= b;
|
||||||
r += (m ^ 1) & (b ^ 1);
|
r += (m ^ 1) & (b ^ 1);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ static inline int ctz(uint64_t in) {
|
|||||||
int i, b, m = 0, r = 0;
|
int i, b, m = 0, r = 0;
|
||||||
|
|
||||||
for (i = 0; i < 64; i++) {
|
for (i = 0; i < 64; i++) {
|
||||||
b = ((int)in >> i) & 1;
|
b = ((int)(in >> i)) & 1;
|
||||||
m |= b;
|
m |= b;
|
||||||
r += (m ^ 1) & (b ^ 1);
|
r += (m ^ 1) & (b ^ 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user