summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf
diff options
context:
space:
mode:
authormarkus <>2004-04-07 20:42:07 +0000
committermarkus <>2004-04-07 20:42:07 +0000
commit58c08aa241f168c84ce7cc3052454ea59a44eada (patch)
tree1806747a3fda66041a998ca63c763fdcf722450e /src/lib/libcrypto/conf
parent9c1aa44a1eacea897c0432e796b205b8484ff4d2 (diff)
downloadopenbsd-58c08aa241f168c84ce7cc3052454ea59a44eada.tar.gz
openbsd-58c08aa241f168c84ce7cc3052454ea59a44eada.tar.bz2
openbsd-58c08aa241f168c84ce7cc3052454ea59a44eada.zip
import openssl-0.9.7d
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r--src/lib/libcrypto/conf/conf_def.c6
-rw-r--r--src/lib/libcrypto/conf/conf_mod.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c
index 57d2739ae0..2e9f52f1fd 100644
--- a/src/lib/libcrypto/conf/conf_def.c
+++ b/src/lib/libcrypto/conf/conf_def.c
@@ -235,7 +235,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
235 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); 235 CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
236 goto err; 236 goto err;
237 } 237 }
238 strcpy(section,"default"); 238 BUF_strlcpy(section,"default",10);
239 239
240 if (_CONF_new_data(conf) == 0) 240 if (_CONF_new_data(conf) == 0)
241 { 241 {
@@ -392,7 +392,7 @@ again:
392 ERR_R_MALLOC_FAILURE); 392 ERR_R_MALLOC_FAILURE);
393 goto err; 393 goto err;
394 } 394 }
395 strcpy(v->name,pname); 395 BUF_strlcpy(v->name,pname,strlen(pname)+1);
396 if (!str_copy(conf,psection,&(v->value),start)) goto err; 396 if (!str_copy(conf,psection,&(v->value),start)) goto err;
397 397
398 if (strcmp(psection,section) != 0) 398 if (strcmp(psection,section) != 0)
@@ -447,7 +447,7 @@ err:
447 if (buff != NULL) BUF_MEM_free(buff); 447 if (buff != NULL) BUF_MEM_free(buff);
448 if (section != NULL) OPENSSL_free(section); 448 if (section != NULL) OPENSSL_free(section);
449 if (line != NULL) *line=eline; 449 if (line != NULL) *line=eline;
450 sprintf(btmp,"%ld",eline); 450 BIO_snprintf(btmp,sizeof btmp,"%ld",eline);
451 ERR_add_error_data(2,"line ",btmp); 451 ERR_add_error_data(2,"line ",btmp);
452 if ((h != conf->data) && (conf->data != NULL)) 452 if ((h != conf->data) && (conf->data != NULL))
453 { 453 {
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c
index edcc08921c..d45adea851 100644
--- a/src/lib/libcrypto/conf/conf_mod.c
+++ b/src/lib/libcrypto/conf/conf_mod.c
@@ -232,7 +232,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
232 { 232 {
233 char rcode[DECIMAL_SIZE(ret)+1]; 233 char rcode[DECIMAL_SIZE(ret)+1];
234 CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR); 234 CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR);
235 sprintf(rcode, "%-8d", ret); 235 BIO_snprintf(rcode, sizeof rcode, "%-8d", ret);
236 ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); 236 ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
237 } 237 }
238 } 238 }
@@ -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 BUF_strlcpy(file,X509_get_default_cert_area(),len + 1);
565#ifndef OPENSSL_SYS_VMS 565#ifndef OPENSSL_SYS_VMS
566 strcat(file,"/"); 566 BUF_strlcat(file,"/",len + 1);
567#endif 567#endif
568 strcat(file,OPENSSL_CONF); 568 BUF_strlcat(file,OPENSSL_CONF,len + 1);
569 569
570 return file; 570 return file;
571 } 571 }
@@ -576,12 +576,12 @@ char *CONF_get1_default_config_file(void)
576 * be used to parse comma separated lists for example. 576 * be used to parse comma separated lists for example.
577 */ 577 */
578 578
579int CONF_parse_list(const char *list, int sep, int nospc, 579int CONF_parse_list(const char *list_, int sep, int nospc,
580 int (*list_cb)(const char *elem, int len, void *usr), void *arg) 580 int (*list_cb)(const char *elem, int len, void *usr), void *arg)
581 { 581 {
582 int ret; 582 int ret;
583 const char *lstart, *tmpend, *p; 583 const char *lstart, *tmpend, *p;
584 lstart = list; 584 lstart = list_;
585 585
586 for(;;) 586 for(;;)
587 { 587 {