Skip to content

Commit 832e0f3

Browse files
authored
Merge pull request #6842 from kaleb-himes/fix-err-introduce-with-cm-move
Fix -4 return code when expected BAD_FUNC_ARG(-173)
2 parents c082216 + e51399c commit 832e0f3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/ssl_certman.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ int wolfSSL_CertManagerVerify(WOLFSSL_CERT_MANAGER* cm, const char* fname,
782782
#ifndef WOLFSSL_SMALL_STACK
783783
byte staticBuffer[FILE_BUFFER_SIZE];
784784
#endif
785-
byte* buff;
785+
byte* buff = NULL;
786786
long sz = 0;
787787
XFILE file = XBADFILE;
788788

@@ -814,6 +814,9 @@ int wolfSSL_CertManagerVerify(WOLFSSL_CERT_MANAGER* cm, const char* fname,
814814
* small. */
815815
#ifndef WOLFSSL_SMALL_STACK
816816
if ((ret == WOLFSSL_SUCCESS) && (sz > (long)sizeof(staticBuffer)))
817+
#else
818+
819+
if (ret == WOLFSSL_SUCCESS)
817820
#endif
818821
{
819822
WOLFSSL_MSG("Getting dynamic buffer");

0 commit comments

Comments
 (0)