diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bss_bio.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_bio.c | 20 |
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 @@ | |||
30 | static int bio_new(BIO *bio); | 30 | static int bio_new(BIO *bio); |
31 | static int bio_free(BIO *bio); | 31 | static int bio_free(BIO *bio); |
32 | static int bio_read(BIO *bio, char *buf, int size); | 32 | static int bio_read(BIO *bio, char *buf, int size); |
33 | static int bio_write(BIO *bio, char *buf, int num); | 33 | static int bio_write(BIO *bio, const char *buf, int num); |
34 | static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr); | 34 | static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr); |
35 | static int bio_puts(BIO *bio, char *str); | 35 | static int bio_puts(BIO *bio, const char *str); |
36 | 36 | ||
37 | static int bio_make_pair(BIO *bio1, BIO *bio2); | 37 | static int bio_make_pair(BIO *bio1, BIO *bio2); |
38 | static void bio_destroy_pair(BIO *bio); | 38 | static 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 | ||
286 | static int bio_write(BIO *bio, char *buf, int num_) | 286 | static 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 | ||
631 | static int bio_puts(BIO *bio, char *str) | 631 | static 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); |