Module Name:    src
Committed By:   martin
Date:           Tue May  5 18:51:08 UTC 2020

Modified Files:
        src/external/bsd/bind/dist/lib/isc [netbsd-8]: sha2.c

Log Message:
Apply patch, requested by he in ticket #1545:

Fix bug revealing itself in sha384 checksum computation: one
important statement was overlooked when converting the code to
avoid alignment issues.


To generate a diff of this commit:
cvs rdiff -u -r1.10.8.1 -r1.10.8.2 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.10.8.1 src/external/bsd/bind/dist/lib/isc/sha2.c:1.10.8.2
--- src/external/bsd/bind/dist/lib/isc/sha2.c:1.10.8.1	Wed Jun 21 18:03:45 2017
+++ src/external/bsd/bind/dist/lib/isc/sha2.c	Tue May  5 18:51:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sha2.c,v 1.10.8.1 2017/06/21 18:03:45 snj Exp $	*/
+/*	$NetBSD: sha2.c,v 1.10.8.2 2020/05/05 18:51:08 martin 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));
 

Reply via email to