From: Taylor R Campbell Date: Fri, 11 Jan 2019 09:36:56 +0000 (+0000) Subject: Fix buffer overflow in self-test. Derp. X-Git-Tag: mit-scheme-pucked-10.1.10~6^2~40 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=986f2d3b128477933a5b7b647d0060fbe0873d99;p=mit-scheme.git Fix buffer overflow in self-test. Derp. This self-test was not used; there's a separate test in test-md5.scm which is fine. (The result in this self-test is also correct -- it just never got tested anywhere.) --- diff --git a/src/microcode/md5.c b/src/microcode/md5.c index a9a0fe5be..c93d6697f 100644 --- a/src/microcode/md5.c +++ b/src/microcode/md5.c @@ -321,7 +321,7 @@ md5_selftest(void) md5_init(&m0); md5_update(&m0, s, i/2); - md5_update(&m0, s + i/2, i); + md5_update(&m0, s + i/2, i - i/2); md5_final(&m0, h); md5_update(&m, h, 16); }