Blame SOURCES/ntp-4.2.6p5-cve-2015-3405.patch

6e16f6
diff -up ntp-4.2.6p5/util/ntp-keygen.c.bigkeygen ntp-4.2.6p5/util/ntp-keygen.c
6e16f6
--- ntp-4.2.6p5/util/ntp-keygen.c.bigkeygen	2015-04-14 09:47:54.205534510 +0200
6e16f6
+++ ntp-4.2.6p5/util/ntp-keygen.c	2015-04-14 09:50:04.068927862 +0200
6e16f6
@@ -742,24 +742,23 @@ gen_md5(
6e16f6
 	ntp_srandom((u_long)epoch);
6e16f6
 	for (i = 1; i <= MD5KEYS; i++) {
6e16f6
 		for (j = 0; j < MD5SIZE; j++) {
6e16f6
-			int temp;
6e16f6
+			u_char temp;
6e16f6
 
6e16f6
 			while (1) {
6e16f6
 				int rc;
6e16f6
 
6e16f6
-				rc = ntp_crypto_random_buf(&temp, 1);
6e16f6
+				rc = ntp_crypto_random_buf(&temp, sizeof(temp));
6e16f6
 				if (-1 == rc) {
6e16f6
 					fprintf(stderr, "ntp_crypto_random_buf() failed.\n");
6e16f6
 					exit (-1);
6e16f6
 				}
6e16f6
-				temp &= 0xff;
6e16f6
 				if (temp == '#')
6e16f6
 					continue;
6e16f6
 
6e16f6
 				if (temp > 0x20 && temp < 0x7f)
6e16f6
 					break;
6e16f6
 			}
6e16f6
-			md5key[j] = (u_char)temp;
6e16f6
+			md5key[j] = temp;
6e16f6
 		}
6e16f6
 		md5key[j] = '\0';
6e16f6
 		fprintf(str, "%2d MD5 %s  # MD5 key\n", i,