mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-08 04:30:47 +02:00
src/ssl_api_pk.c: in wolfSSL_CTX_SetTmpEC_DHE_Sz(), fix gate-dependent syntax error in if construct;
src/ssl_p7p12.c: in wolfSSL_SMIME_read_PKCS7(), fix memleakOnRealloc.
This commit is contained in:
+2
-1
@@ -663,8 +663,9 @@ int wolfSSL_CTX_SetTmpEC_DHE_Sz(WOLFSSL_CTX* ctx, word16 sz)
|
||||
if (sz < ECC_MINSIZE) {
|
||||
ret = BAD_FUNC_ARG;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
else if (sz > ECC_MAXSIZE) {
|
||||
if (sz > ECC_MAXSIZE) {
|
||||
ret = BAD_FUNC_ARG;
|
||||
}
|
||||
else {
|
||||
|
||||
+4
-2
@@ -1206,12 +1206,14 @@ PKCS7* wolfSSL_SMIME_read_PKCS7(WOLFSSL_BIO* in,
|
||||
/* If line endings were added, the initial length may be
|
||||
* exceeded. */
|
||||
if ((canonPos + canonLineLen) >= canonSize) {
|
||||
char* newCanonSection;
|
||||
canonSize = canonPos + canonLineLen;
|
||||
canonSection = (char*)XREALLOC(canonSection, canonSize,
|
||||
newCanonSection = (char*)XREALLOC(canonSection, canonSize,
|
||||
NULL, DYNAMIC_TYPE_PKCS7);
|
||||
if (canonSection == NULL) {
|
||||
if (newCanonSection == NULL) {
|
||||
goto error;
|
||||
}
|
||||
canonSection = newCanonSection;
|
||||
}
|
||||
XMEMCPY(&canonSection[canonPos], canonLine,
|
||||
(int)canonLineLen - 1);
|
||||
|
||||
Reference in New Issue
Block a user