[Git][NTPsec/ntpsec][master] Fix arbitrary constant.

Hal Murray gitlab at mg.gitlab.com
Tue Jan 12 21:42:16 UTC 2016


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
79b35ab9 by Hal Murray at 2016-01-12T13:40:33Z
Fix arbitrary constant.

- - - - -


1 changed file:

- ntpkeygen/ntpkeygen.c


Changes:

=====================================
ntpkeygen/ntpkeygen.c
=====================================
--- a/ntpkeygen/ntpkeygen.c
+++ b/ntpkeygen/ntpkeygen.c
@@ -980,7 +980,7 @@ gen_md5(
 	}
 #ifdef HAVE_OPENSSL
 	for (i = 1; i <= MD5KEYS; i++) {
-		RAND_bytes(keystr, 20);
+		RAND_bytes(keystr, sizeof(keystr));
 		for (j = 0; j < MD5SIZE; j++) {
 			hexstr[2 * j] = hex[keystr[j] >> 4];
 			hexstr[2 * j + 1] = hex[keystr[j] & 0xf];



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/79b35ab9fa7aa443dc692980590ef31812cd8d03
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160112/6ae68b99/attachment.html>


More information about the vc mailing list