Commit 8a8cca28 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix a buffer overflow in INFORMATION_SCHEMA.GLOBAL_VARIABLES, caused by MDEV-12179

pretty_print_engine_list(): When the plugin list is empty, return
an empty string instead of allocating a buffer of 0 bytes and then
trying to write a NUL byte into it.
parent 4e1fa7f6
......@@ -1483,7 +1483,7 @@ pretty_print_engine_list(THD *thd, plugin_ref *list)
size_t size;
char *buf, *pos;
if (!list)
if (!list || !*list)
return thd->strmake("", 0);
size= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment