mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-26 09:52:20 +01:00
src/internal.c: in HashOutput(), check for null output pointer;
examples/pem/pem.c: in main(), add missing check that ret == 0 in _DER_TO_PEM code path.
This commit is contained in:
@@ -977,7 +977,7 @@ int main(int argc, char* argv[])
|
||||
out_len = der->length;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else if (ret == 0) {
|
||||
#ifdef WOLFSSL_DER_TO_PEM
|
||||
#if defined(WOLFSSL_ENCRYPTED_KEYS) && !defined(NO_PWDBASED)
|
||||
if (enc_der) {
|
||||
|
||||
@@ -10470,7 +10470,7 @@ int HashOutput(WOLFSSL* ssl, const byte* output, int sz, int ivSz)
|
||||
{
|
||||
const byte* adj;
|
||||
|
||||
if (ssl->hsHashes == NULL)
|
||||
if ((ssl->hsHashes == NULL) || (output == NULL))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
adj = output + RECORD_HEADER_SZ + ivSz;
|
||||
|
||||
Reference in New Issue
Block a user