You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
sha: change loop condition to be tighter.
This makes no change to the way the code functions, but should make it easier for static analyzers to see the valid range for i Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -210,7 +210,7 @@ static void sha256_transform(uint32_t *state, const uint8_t buffer[64])
|
|||||||
a = T1 + T2;
|
a = T1 + T2;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
for (i = 0; i < 16;) {
|
for (i = 0; i < 16 - 7;) {
|
||||||
ROUND256_0_TO_15(a, b, c, d, e, f, g, h);
|
ROUND256_0_TO_15(a, b, c, d, e, f, g, h);
|
||||||
ROUND256_0_TO_15(h, a, b, c, d, e, f, g);
|
ROUND256_0_TO_15(h, a, b, c, d, e, f, g);
|
||||||
ROUND256_0_TO_15(g, h, a, b, c, d, e, f);
|
ROUND256_0_TO_15(g, h, a, b, c, d, e, f);
|
||||||
@ -221,7 +221,7 @@ static void sha256_transform(uint32_t *state, const uint8_t buffer[64])
|
|||||||
ROUND256_0_TO_15(b, c, d, e, f, g, h, a);
|
ROUND256_0_TO_15(b, c, d, e, f, g, h, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; i < 64;) {
|
for (; i < 64 - 7;) {
|
||||||
ROUND256_16_TO_63(a, b, c, d, e, f, g, h);
|
ROUND256_16_TO_63(a, b, c, d, e, f, g, h);
|
||||||
ROUND256_16_TO_63(h, a, b, c, d, e, f, g);
|
ROUND256_16_TO_63(h, a, b, c, d, e, f, g);
|
||||||
ROUND256_16_TO_63(g, h, a, b, c, d, e, f);
|
ROUND256_16_TO_63(g, h, a, b, c, d, e, f);
|
||||||
|
Reference in New Issue
Block a user