diff options
author | ho <> | 2003-03-16 12:18:21 +0000 |
---|---|---|
committer | ho <> | 2003-03-16 12:18:21 +0000 |
commit | a4c0f9de9c618e0271a7e122136bdfe50301a6d7 (patch) | |
tree | 92679b9e140a2b594f7238dbaf4556cb2da66d73 /src/lib/libcrypto/conf | |
parent | 68d910a736124944b061ef4eb6d3e07b4682389a (diff) | |
download | openbsd-a4c0f9de9c618e0271a7e122136bdfe50301a6d7.tar.gz openbsd-a4c0f9de9c618e0271a7e122136bdfe50301a6d7.tar.bz2 openbsd-a4c0f9de9c618e0271a7e122136bdfe50301a6d7.zip |
Less strcpy/strcat/sprintf. tdeval@ ok.
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_mod.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index 5e194de60e..37925b603d 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
@@ -234,7 +234,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) | |||
234 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | 234 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); |
235 | goto err; | 235 | goto err; |
236 | } | 236 | } |
237 | strcpy(section,"default"); | 237 | strlcpy(section,"default",10); |
238 | 238 | ||
239 | if (_CONF_new_data(conf) == 0) | 239 | if (_CONF_new_data(conf) == 0) |
240 | { | 240 | { |
@@ -390,7 +390,7 @@ again: | |||
390 | ERR_R_MALLOC_FAILURE); | 390 | ERR_R_MALLOC_FAILURE); |
391 | goto err; | 391 | goto err; |
392 | } | 392 | } |
393 | strcpy(v->name,pname); | 393 | strlcpy(v->name,pname,strlen(pname)+1); |
394 | if (!str_copy(conf,psection,&(v->value),start)) goto err; | 394 | if (!str_copy(conf,psection,&(v->value),start)) goto err; |
395 | 395 | ||
396 | if (strcmp(psection,section) != 0) | 396 | if (strcmp(psection,section) != 0) |
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c index edcc08921c..8270ae5eb5 100644 --- a/src/lib/libcrypto/conf/conf_mod.c +++ b/src/lib/libcrypto/conf/conf_mod.c | |||
@@ -561,11 +561,11 @@ char *CONF_get1_default_config_file(void) | |||
561 | 561 | ||
562 | if (!file) | 562 | if (!file) |
563 | return NULL; | 563 | return NULL; |
564 | strcpy(file,X509_get_default_cert_area()); | 564 | strlcpy(file,X509_get_default_cert_area(),len + 1); |
565 | #ifndef OPENSSL_SYS_VMS | 565 | #ifndef OPENSSL_SYS_VMS |
566 | strcat(file,"/"); | 566 | strlcat(file,"/",len + 1); |
567 | #endif | 567 | #endif |
568 | strcat(file,OPENSSL_CONF); | 568 | strlcat(file,OPENSSL_CONF,len + 1); |
569 | 569 | ||
570 | return file; | 570 | return file; |
571 | } | 571 | } |