mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-36894 JSNX::SetArrayOptions and BJNX::SetArrayOptions unused nm arg
Calling SetArrayOptions with Nodes[i - 1].Key as its nm argument exposed a MemorySanitizer error when i=0 for the tests: * connect.bson_udf * connect.json_udf * connect.json_udf_bin Its assumed that a basic optimization would have eliminated these invalid expressions. As the nm argument was unused, it has been removed.
This commit is contained in:
@@ -191,7 +191,7 @@ my_bool BJNX::SetJpath(PGLOBAL g, char* path, my_bool jb)
|
||||
/*********************************************************************************/
|
||||
/* Analyse array processing options. */
|
||||
/*********************************************************************************/
|
||||
my_bool BJNX::SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm)
|
||||
my_bool BJNX::SetArrayOptions(PGLOBAL g, char* p, int i)
|
||||
{
|
||||
int n = (int)strlen(p);
|
||||
my_bool dg = true, b = false;
|
||||
@@ -339,7 +339,7 @@ my_bool BJNX::ParseJpath(PGLOBAL g)
|
||||
// Jpath must be explicit
|
||||
if (a || *p == 0 || *p == '[' || IsNum(p)) {
|
||||
// Analyse intermediate array processing
|
||||
if (SetArrayOptions(g, p, i, Nodes[i - 1].Key))
|
||||
if (SetArrayOptions(g, p, i))
|
||||
return true;
|
||||
|
||||
} else if (*p == '*') {
|
||||
|
Reference in New Issue
Block a user