summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/demos/b64.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/demos/b64.c')
-rw-r--r--src/lib/libssl/src/demos/b64.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libssl/src/demos/b64.c b/src/lib/libssl/src/demos/b64.c
index 42abc42d33..113da89baf 100644
--- a/src/lib/libssl/src/demos/b64.c
+++ b/src/lib/libssl/src/demos/b64.c
@@ -59,13 +59,13 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62#include "apps.h" 62#include "../apps/apps.h"
63#include "buffer.h" 63#include <openssl/buffer.h>
64#include "err.h" 64#include <openssl/err.h>
65#include "evp.h" 65#include <openssl/evp.h>
66#include "objects.h" 66#include <openssl/objects.h>
67#include "x509.h" 67#include <openssl/x509.h>
68#include "pem.h" 68#include <openssl/pem.h>
69 69
70#undef SIZE 70#undef SIZE
71#undef BSIZE 71#undef BSIZE
@@ -91,8 +91,8 @@ char **argv;
91 EVP_CIPHER *cipher=NULL,*c; 91 EVP_CIPHER *cipher=NULL,*c;
92 char *inf=NULL,*outf=NULL; 92 char *inf=NULL,*outf=NULL;
93 BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL; 93 BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
94#define PROG_NAME_SIZE 16 94#define PROG_NAME_SIZE 39
95 char pname[PROG_NAME_SIZE]; 95 char pname[PROG_NAME_SIZE+1];
96 96
97 97
98 apps_startup(); 98 apps_startup();
@@ -177,11 +177,11 @@ bad:
177 if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize); 177 if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize);
178 } 178 }
179 179
180 strbuf=Malloc(SIZE); 180 strbuf=OPENSSL_malloc(SIZE);
181 buff=(unsigned char *)Malloc(EVP_ENCODE_LENGTH(bsize)); 181 buff=(unsigned char *)OPENSSL_malloc(EVP_ENCODE_LENGTH(bsize));
182 if ((buff == NULL) || (strbuf == NULL)) 182 if ((buff == NULL) || (strbuf == NULL))
183 { 183 {
184 BIO_printf(bio_err,"Malloc failure\n"); 184 BIO_printf(bio_err,"OPENSSL_malloc failure\n");
185 goto end; 185 goto end;
186 } 186 }
187 187
@@ -259,8 +259,8 @@ bad:
259 BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out)); 259 BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out));
260 } 260 }
261end: 261end:
262 if (strbuf != NULL) Free(strbuf); 262 if (strbuf != NULL) OPENSSL_free(strbuf);
263 if (buff != NULL) Free(buff); 263 if (buff != NULL) OPENSSL_free(buff);
264 if (in != NULL) BIO_free(in); 264 if (in != NULL) BIO_free(in);
265 if (out != NULL) BIO_free(out); 265 if (out != NULL) BIO_free(out);
266 if (benc != NULL) BIO_free(benc); 266 if (benc != NULL) BIO_free(benc);