summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bss_bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bss_bio.c')
-rw-r--r--src/lib/libcrypto/bio/bss_bio.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/bio/bss_bio.c b/src/lib/libcrypto/bio/bss_bio.c
index 1e2d7491f2..78c6ab4fdd 100644
--- a/src/lib/libcrypto/bio/bss_bio.c
+++ b/src/lib/libcrypto/bio/bss_bio.c
@@ -30,9 +30,9 @@
30static int bio_new(BIO *bio); 30static int bio_new(BIO *bio);
31static int bio_free(BIO *bio); 31static int bio_free(BIO *bio);
32static int bio_read(BIO *bio, char *buf, int size); 32static int bio_read(BIO *bio, char *buf, int size);
33static int bio_write(BIO *bio, char *buf, int num); 33static int bio_write(BIO *bio, const char *buf, int num);
34static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr); 34static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr);
35static int bio_puts(BIO *bio, char *str); 35static int bio_puts(BIO *bio, const char *str);
36 36
37static int bio_make_pair(BIO *bio1, BIO *bio2); 37static int bio_make_pair(BIO *bio1, BIO *bio2);
38static void bio_destroy_pair(BIO *bio); 38static void bio_destroy_pair(BIO *bio);
@@ -80,7 +80,7 @@ static int bio_new(BIO *bio)
80 { 80 {
81 struct bio_bio_st *b; 81 struct bio_bio_st *b;
82 82
83 b = Malloc(sizeof *b); 83 b = OPENSSL_malloc(sizeof *b);
84 if (b == NULL) 84 if (b == NULL)
85 return 0; 85 return 0;
86 86
@@ -108,10 +108,10 @@ static int bio_free(BIO *bio)
108 108
109 if (b->buf != NULL) 109 if (b->buf != NULL)
110 { 110 {
111 Free(b->buf); 111 OPENSSL_free(b->buf);
112 } 112 }
113 113
114 Free(b); 114 OPENSSL_free(b);
115 115
116 return 1; 116 return 1;
117 } 117 }
@@ -283,7 +283,7 @@ static ssize_t bio_nread(BIO *bio, char **buf, size_t num_)
283 } 283 }
284 284
285 285
286static int bio_write(BIO *bio, char *buf, int num_) 286static int bio_write(BIO *bio, const char *buf, int num_)
287 { 287 {
288 size_t num = num_; 288 size_t num = num_;
289 size_t rest; 289 size_t rest;
@@ -464,7 +464,7 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr)
464 { 464 {
465 if (b->buf) 465 if (b->buf)
466 { 466 {
467 Free(b->buf); 467 OPENSSL_free(b->buf);
468 b->buf = NULL; 468 b->buf = NULL;
469 } 469 }
470 b->size = new_size; 470 b->size = new_size;
@@ -628,7 +628,7 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr)
628 return ret; 628 return ret;
629 } 629 }
630 630
631static int bio_puts(BIO *bio, char *str) 631static int bio_puts(BIO *bio, const char *str)
632 { 632 {
633 return bio_write(bio, str, strlen(str)); 633 return bio_write(bio, str, strlen(str));
634 } 634 }
@@ -652,7 +652,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2)
652 652
653 if (b1->buf == NULL) 653 if (b1->buf == NULL)
654 { 654 {
655 b1->buf = Malloc(b1->size); 655 b1->buf = OPENSSL_malloc(b1->size);
656 if (b1->buf == NULL) 656 if (b1->buf == NULL)
657 { 657 {
658 BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); 658 BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE);
@@ -664,7 +664,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2)
664 664
665 if (b2->buf == NULL) 665 if (b2->buf == NULL)
666 { 666 {
667 b2->buf = Malloc(b2->size); 667 b2->buf = OPENSSL_malloc(b2->size);
668 if (b2->buf == NULL) 668 if (b2->buf == NULL)
669 { 669 {
670 BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); 670 BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE);