Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1b3cf18e
Commit
1b3cf18e
authored
Jul 15, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CONNECT: accessed p[i] outside of the loop
this failed json.test on fulltest2 builder
parent
95dcfede
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
storage/connect/value.cpp
storage/connect/value.cpp
+26
-26
No files found.
storage/connect/value.cpp
View file @
1b3cf18e
...
...
@@ -1655,37 +1655,37 @@ bool TYPVAL<PSZ>::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op)
int
i
;
for
(
i
=
0
;
i
<
np
;
i
++
)
p
[
i
]
=
vp
[
i
]
->
IsNull
()
?
NULL
:
vp
[
i
]
->
GetCharString
(
val
[
i
]);
if
(
p
[
i
])
{
switch
(
op
)
{
case
OP_CNC
:
assert
(
np
==
1
||
np
==
2
);
if
(
vp
[
i
]
->
IsNull
())
return
false
;
else
p
[
i
]
=
vp
[
i
]
->
GetCharString
(
val
[
i
]);
if
(
np
==
2
)
SetValue_psz
(
p
[
0
]);
switch
(
op
)
{
case
OP_CNC
:
assert
(
np
==
1
||
np
==
2
);
if
((
i
=
Len
-
(
signed
)
strlen
(
Strp
))
>
0
)
strncat
(
Strp
,
p
[
np
-
1
],
i
);
if
(
np
==
2
)
SetValue_psz
(
p
[
0
]
);
break
;
case
OP_MIN
:
assert
(
np
==
2
);
SetValue_psz
((
strcmp
(
p
[
0
],
p
[
1
])
<
0
)
?
p
[
0
]
:
p
[
1
]);
break
;
case
OP_MAX
:
assert
(
np
==
2
);
SetValue_psz
((
strcmp
(
p
[
0
],
p
[
1
])
>
0
)
?
p
[
0
]
:
p
[
1
]);
break
;
default:
// sprintf(g->Message, MSG(BAD_EXP_OPER), op);
strcpy
(
g
->
Message
,
"Function not supported"
);
return
true
;
}
// endswitch op
if
((
i
=
Len
-
(
signed
)
strlen
(
Strp
))
>
0
)
strncat
(
Strp
,
p
[
np
-
1
],
i
);
Null
=
false
;
}
// endif p[i]
break
;
case
OP_MIN
:
assert
(
np
==
2
);
SetValue_psz
((
strcmp
(
p
[
0
],
p
[
1
])
<
0
)
?
p
[
0
]
:
p
[
1
]);
break
;
case
OP_MAX
:
assert
(
np
==
2
);
SetValue_psz
((
strcmp
(
p
[
0
],
p
[
1
])
>
0
)
?
p
[
0
]
:
p
[
1
]);
break
;
default:
// sprintf(g->Message, MSG(BAD_EXP_OPER), op);
strcpy
(
g
->
Message
,
"Function not supported"
);
return
true
;
}
// endswitch op
Null
=
false
;
return
false
;
}
// end of Compute
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment