Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | ed005e302de418dd20a3b86ced7f103347422a1c |
|---|---|
| Date: | 2012-07-27 00:00:45 |
| User: | drh |
| Comment: | Fix a faulty (but harmless) initialization in the MD5 code. |
Tags And Properties
- branch=trunk inherited from [bf1c21ba16]
- sym-trunk inherited from [bf1c21ba16]
Changes
Changes to src/md5.c
262 /* Append length in bits and transform */ 262 /* Append length in bits and transform */ 263 ((uint32 *)ctx->in)[ 14 ] = ctx->bits[0]; 263 ((uint32 *)ctx->in)[ 14 ] = ctx->bits[0]; 264 ((uint32 *)ctx->in)[ 15 ] = ctx->bits[1]; 264 ((uint32 *)ctx->in)[ 15 ] = ctx->bits[1]; 265 265 266 MD5Transform(ctx->buf, (uint32 *)ctx->in); 266 MD5Transform(ctx->buf, (uint32 *)ctx->in); 267 byteReverse((unsigned char *)ctx->buf, 4); 267 byteReverse((unsigned char *)ctx->buf, 4); 268 memcpy(digest, ctx->buf, 16); 268 memcpy(digest, ctx->buf, 16); 269 memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ | 269 memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ 270 } 270 } 271 271 272 /* 272 /* 273 ** Convert a digest into base-16. digest should be declared as 273 ** Convert a digest into base-16. digest should be declared as 274 ** "unsigned char digest[16]" in the calling function. The MD5 274 ** "unsigned char digest[16]" in the calling function. The MD5 275 ** digest is stored in the first 16 bytes. zBuf should 275 ** digest is stored in the first 16 bytes. zBuf should 276 ** be "char zBuf[33]". 276 ** be "char zBuf[33]".