Loading apps/engine.c +6 −3 Original line number Diff line number Diff line Loading @@ -108,12 +108,15 @@ static int append_buf(char **buf, const char *s, int *size, int step) } if (strlen(*buf) + strlen(s) >= (unsigned int)*size) { char *p = *buf; *size += step; *buf = OPENSSL_realloc(*buf, *size); } if (*buf == NULL) if (*buf == NULL) { OPENSSL_free(p); return 0; } } if (**buf != '\0') BUF_strlcat(*buf, ", ", *size); Loading ssl/ssl_rsa.c +4 −2 Original line number Diff line number Diff line Loading @@ -964,6 +964,7 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file) int ret = 0; BIO *bin = NULL; size_t num_extensions = 0; unsigned char *new_serverinfo; if (ctx == NULL || file == NULL) { SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO_FILE, Loading Loading @@ -1014,12 +1015,13 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file) goto end; } /* Append the decoded extension to the serverinfo buffer */ serverinfo = new_serverinfo = OPENSSL_realloc(serverinfo, serverinfo_length + extension_length); if (serverinfo == NULL) { if (new_serverinfo == NULL) { SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO_FILE, ERR_R_MALLOC_FAILURE); goto end; } serverinfo = new_serverinfo; memcpy(serverinfo + serverinfo_length, extension, extension_length); serverinfo_length += extension_length; Loading ssl/t1_ext.c +6 −8 Original line number Diff line number Diff line Loading @@ -223,16 +223,14 @@ static int custom_ext_meth_add(custom_ext_methods *exts, /* Search for duplicate */ if (custom_ext_find(exts, ext_type)) return 0; exts->meths = OPENSSL_realloc(exts->meths, (exts->meths_count + 1) * sizeof(custom_ext_method)); if (!exts->meths) { exts->meths_count = 0; meth = OPENSSL_realloc(exts->meths, (exts->meths_count + 1) * sizeof(custom_ext_method)); if (meth == NULL) return 0; } meth = exts->meths + exts->meths_count; exts->meths = meth; meth += exts->meths_count; memset(meth, 0, sizeof(custom_ext_method)); meth->parse_cb = parse_cb; meth->add_cb = add_cb; Loading Loading
apps/engine.c +6 −3 Original line number Diff line number Diff line Loading @@ -108,12 +108,15 @@ static int append_buf(char **buf, const char *s, int *size, int step) } if (strlen(*buf) + strlen(s) >= (unsigned int)*size) { char *p = *buf; *size += step; *buf = OPENSSL_realloc(*buf, *size); } if (*buf == NULL) if (*buf == NULL) { OPENSSL_free(p); return 0; } } if (**buf != '\0') BUF_strlcat(*buf, ", ", *size); Loading
ssl/ssl_rsa.c +4 −2 Original line number Diff line number Diff line Loading @@ -964,6 +964,7 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file) int ret = 0; BIO *bin = NULL; size_t num_extensions = 0; unsigned char *new_serverinfo; if (ctx == NULL || file == NULL) { SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO_FILE, Loading Loading @@ -1014,12 +1015,13 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file) goto end; } /* Append the decoded extension to the serverinfo buffer */ serverinfo = new_serverinfo = OPENSSL_realloc(serverinfo, serverinfo_length + extension_length); if (serverinfo == NULL) { if (new_serverinfo == NULL) { SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO_FILE, ERR_R_MALLOC_FAILURE); goto end; } serverinfo = new_serverinfo; memcpy(serverinfo + serverinfo_length, extension, extension_length); serverinfo_length += extension_length; Loading
ssl/t1_ext.c +6 −8 Original line number Diff line number Diff line Loading @@ -223,16 +223,14 @@ static int custom_ext_meth_add(custom_ext_methods *exts, /* Search for duplicate */ if (custom_ext_find(exts, ext_type)) return 0; exts->meths = OPENSSL_realloc(exts->meths, (exts->meths_count + 1) * sizeof(custom_ext_method)); if (!exts->meths) { exts->meths_count = 0; meth = OPENSSL_realloc(exts->meths, (exts->meths_count + 1) * sizeof(custom_ext_method)); if (meth == NULL) return 0; } meth = exts->meths + exts->meths_count; exts->meths = meth; meth += exts->meths_count; memset(meth, 0, sizeof(custom_ext_method)); meth->parse_cb = parse_cb; meth->add_cb = add_cb; Loading