diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-29 18:20:32 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-29 18:20:32 +0200 |
commit | bef843b97f2e91859f2a08845822d619e769f89f (patch) | |
tree | a0db144a096e936ac70b3f46ab21e93576766f3e /cmake/os | |
parent | cb14d2e1a5f682a413943294b8137d35ba948a1d (diff) | |
download | mariadb-git-bef843b97f2e91859f2a08845822d619e769f89f.tar.gz |
MDEV-20917 InnoDB is passing NULL to nonnull function parameters
mem_heap_dup(): Avoid mem_heap_alloc() and memcpy() of data=NULL, len=0.
trx_undo_report_insert_virtual(), trx_undo_page_report_insert(),
trx_undo_page_report_modify(): Avoid memcpy(ptr, NULL, 0).
dfield_data_is_binary_equal(): Correctly handle data=NULL, len=0.
rec_init_offsets_temp(): Do allow def_val=NULL in the interface.
This clean-up was motivated by WITH_UBSAN, and no bug related to this
was observed in the wild. It should be noted that undefined behaviour
such as memcpy(ptr, NULL, 0) could allow compilers to perform unsafe
optimizations, like it was the case in
commit fc168c3a5e58d8b364a2e87e0d876a261ec7fced (MDEV-15587).
Diffstat (limited to 'cmake/os')
0 files changed, 0 insertions, 0 deletions