Commit b5583fc3 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/cast5: Fix off by one error

Fixes fate-cast5 on alpha
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 81ce3f8e
...@@ -457,7 +457,7 @@ av_cold int av_cast5_init(AVCAST5* cs, const uint8_t *key, int key_bits) ...@@ -457,7 +457,7 @@ av_cold int av_cast5_init(AVCAST5* cs, const uint8_t *key, int key_bits)
q[i]=AV_RB32(newKey+(4*i)); q[i]=AV_RB32(newKey+(4*i));
generate_round_keys(cs->rounds,cs->Km,q,p); generate_round_keys(cs->rounds,cs->Km,q,p);
generate_round_keys(cs->rounds,cs->Kr,q,p); generate_round_keys(cs->rounds,cs->Kr,q,p);
for (i=0;i<cs->rounds;i++) for (i=0;i<=cs->rounds;i++)
cs->Kr[i]=cs->Kr[i]&0x1f; cs->Kr[i]=cs->Kr[i]&0x1f;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment