Module Name: src
Committed By: sborrill
Date: Wed May 6 07:40:17 UTC 2020
Modified Files:
src/external/bsd/bind/dist/lib/isc [netbsd-7]: sha2.c
Log Message:
Fix bug in sha384 checksum computation introduced when converting the code
to avoid alignment issues.
To generate a diff of this commit:
cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/external/bsd/bind/dist/lib/isc/sha2.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/bind/dist/lib/isc/sha2.c
diff -u src/external/bsd/bind/dist/lib/isc/sha2.c:1.8.2.2 src/external/bsd/bind/dist/lib/isc/sha2.c:1.8.2.3
--- src/external/bsd/bind/dist/lib/isc/sha2.c:1.8.2.2 Tue Jun 20 17:09:53 2017
+++ src/external/bsd/bind/dist/lib/isc/sha2.c Wed May 6 07:40:17 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: sha2.c,v 1.8.2.2 2017/06/20 17:09:53 snj Exp $ */
+/* $NetBSD: sha2.c,v 1.8.2.3 2020/05/06 07:40:17 sborrill Exp $ */
/*
* Copyright (C) 2005-2007, 2009, 2011, 2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
@@ -1503,6 +1503,8 @@ void isc_sha512_last(isc_sha512_t *conte
*context->buffer = 0x80;
}
/* Store the length of input data (in bits): */
+ memcpy(&context->buffer[ISC_SHA512_SHORT_BLOCK_LENGTH],
+ &context->bitcount[1], sizeof(isc_uint64_t));
memcpy(&context->buffer[ISC_SHA512_SHORT_BLOCK_LENGTH+8],
&context->bitcount[0], sizeof(isc_uint64_t));