summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-09-03 08:41:47 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-09-03 08:41:47 +0300
commita256070e7d94fdd1d63a4823c638ff5c76ca9c73 (patch)
treeadb07b5d0224c94ed91a9048d0b450f80e996c66 /mysys
parentcd36bc01a5f1c1cd126cdd0668c6049cc78be40a (diff)
downloadmariadb-git-a256070e7d94fdd1d63a4823c638ff5c76ca9c73.tar.gz
MDEV-7110 follow-up fix: Do not pass NULL as nonnull parameter
Passing a null pointer to the "%s" argument of a printf-like function is undefined behaviour. In the GNU libc implementation of the printf() family of functions, it happens to work. GCC 10.2.0 would diagnose this with -Wformat-overflow -Og. In -fsanitize=undefined (WITH_UBSAN=ON) builds, a runtime error would be generated. In some other builds, GCC 8 or later might infer that the parameter is nonnull and optimize away further checks whether the parameter is null, leading to SIGSEGV.
Diffstat (limited to 'mysys')
0 files changed, 0 insertions, 0 deletions