correct another instance of RAND_file_name usage
This commit is contained in:
parent
90eb0119b3
commit
67d7745f65
24
net/ntp/patches/patch-ntpd_ntp_crypto_c
Normal file
24
net/ntp/patches/patch-ntpd_ntp_crypto_c
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-ntpd_ntp_crypto_c,v 1.1 2001/12/20 15:00:09 danh Exp $
|
||||
--- ntpd/ntp_crypto.c.orig Thu Dec 20 09:40:55 2001
|
||||
+++ ntpd/ntp_crypto.c Thu Dec 20 09:51:08 2001
|
||||
@@ -1675,6 +1675,7 @@ crypto_setup(void)
|
||||
{
|
||||
struct cert_info *cinf; /* certificate information */
|
||||
char filename[MAXFILENAME]; /* name of rsa key file */
|
||||
+ const char *rf;
|
||||
l_fp tstamp; /* NTP timestamp */
|
||||
u_int len, bytes;
|
||||
u_char *ptr;
|
||||
@@ -1701,9 +1702,9 @@ crypto_setup(void)
|
||||
*/
|
||||
ERR_load_crypto_strings();
|
||||
if (rand_file == NULL) {
|
||||
- if ((RAND_file_name(filename, MAXFILENAME)) != NULL) {
|
||||
- rand_file = emalloc(strlen(filename) + 1);
|
||||
- strcpy(rand_file, filename);
|
||||
+ if ((rf = RAND_file_name(filename, MAXFILENAME)) != NULL) {
|
||||
+ rand_file = emalloc(strlen(rf) + 1);
|
||||
+ strcpy(rand_file, rf);
|
||||
}
|
||||
} else if (*rand_file != '/') {
|
||||
snprintf(filename, MAXFILENAME, "%s/%s", keysdir,
|
Loading…
Reference in New Issue
Block a user