Fix instances of pointer addition with the NULL pointer
authorMatt Caswell <matt@openssl.org>
Wed, 25 Nov 2020 13:13:24 +0000 (13:13 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 30 Nov 2020 10:37:14 +0000 (10:37 +0000)
commita07dc8167ba79efe739fef18d7e2ef823bef16c9
tree5c25d9ab7f0eff4bf3d7f63e092790095e76eead
parent5658470ce7b4fabfd1fa2cdc69bee8d3a5e826f9
Fix instances of pointer addition with the NULL pointer

Addition using the NULL pointer (even when adding 0) is undefined
behaviour. Recent versions of ubsan are now complaining about this, so
we fix various instances.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13513)
crypto/asn1/a_int.c
crypto/bio/bss_mem.c
crypto/pem/pem_lib.c
providers/implementations/ciphers/cipher_aes_ocb.c
test/filterprov.c
test/testutil/format_output.c