Fix generated md5, it was wrong for some input lengths.

Fix issue634.

Originally committed as revision 15335 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-09-15 22:10:28 +00:00
parent 631e8afb8c
commit 53e9d0105f

View File

@ -144,7 +144,7 @@ void av_md5_final(AVMD5 *ctx, uint8_t *dst){
uint64_t finalcount= le2me_64(ctx->len<<3); uint64_t finalcount= le2me_64(ctx->len<<3);
av_md5_update(ctx, "\200", 1); av_md5_update(ctx, "\200", 1);
while((ctx->len & 63)<56) while((ctx->len & 63)!=56)
av_md5_update(ctx, "", 1); av_md5_update(ctx, "", 1);
av_md5_update(ctx, (uint8_t*)&finalcount, 8); av_md5_update(ctx, (uint8_t*)&finalcount, 8);