diff options
| author | Peter Jones <pjones@redhat.com> | 2021-03-08 11:54:33 -0500 |
|---|---|---|
| committer | Jan Setje-Eilers <73182357+jsetje@users.noreply.github.com> | 2021-03-09 13:52:53 -0800 |
| commit | 1954ef164a55cbc4369f513cca3fb43f3550d81a (patch) | |
| tree | 124965e9d3355c9438d645fa0f1e881fe554fedf /Cryptlib/OpenSSL/crypto/mem_dbg.c | |
| parent | dddeaf3f7dc8d30640119e999bbfabf4ce068a68 (diff) | |
| download | efi-boot-shim-1954ef164a55cbc4369f513cca3fb43f3550d81a.tar.gz efi-boot-shim-1954ef164a55cbc4369f513cca3fb43f3550d81a.zip | |
Minor OpenSSL fixes
These are all the NULL pointer dereferences (which all appear to be, at
worst, very difficult to hit) that gcc -fanalyzer finds in our OpenSSL
code.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/mem_dbg.c')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/mem_dbg.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Cryptlib/OpenSSL/crypto/mem_dbg.c b/Cryptlib/OpenSSL/crypto/mem_dbg.c index 8525ded7..c98c1b88 100644 --- a/Cryptlib/OpenSSL/crypto/mem_dbg.c +++ b/Cryptlib/OpenSSL/crypto/mem_dbg.c @@ -640,8 +640,13 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l) if (m->addr == (char *)l->bio) return; + if (!bufp) + return; + if (options & V_CRYPTO_MDEBUG_TIME) { lcl = localtime(&m->time); + if (!lcl) + return; BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ", lcl->tm_hour, lcl->tm_min, lcl->tm_sec); |
