d961b2ef50
Fixes for CVE-2018-18820 (buffer overflows in URL auth code) and other bugs. While here, address a compiler warning in md5.c. Reported by Aham Brahmasmi, ok kn@
17 lines
458 B
Plaintext
17 lines
458 B
Plaintext
$OpenBSD: patch-src_md5_c,v 1.1 2018/11/20 17:32:36 jca Exp $
|
|
|
|
Fix memset size param.
|
|
|
|
Index: src/md5.c
|
|
--- src/md5.c.orig
|
|
+++ src/md5.c
|
|
@@ -174,7 +174,7 @@ void MD5Final(unsigned char digest[HASH_LEN], struct M
|
|
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
|
byteReverse((unsigned char *) ctx->buf, 4);
|
|
memcpy(digest, ctx->buf, HASH_LEN);
|
|
- memset(ctx, 0, sizeof(ctx));
|
|
+ memset(ctx, 0, sizeof(*ctx));
|
|
/* In case it's sensitive */
|
|
}
|
|
|