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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5b460c64
Commit
5b460c64
authored
Jan 24, 2015
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Protect AllocateValue against a null sp.
modified: storage/connect/value.cpp
parent
7ebd3f6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
storage/connect/value.cpp
storage/connect/value.cpp
+2
-2
No files found.
storage/connect/value.cpp
View file @
5b460c64
...
...
@@ -446,7 +446,7 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns)
case
TYPE_STRING
:
p
=
(
PSZ
)
PlugSubAlloc
(
g
,
NULL
,
1
+
valp
->
GetValLen
());
if
((
sp
=
valp
->
GetCharString
(
p
))
!=
p
)
if
((
sp
=
valp
->
GetCharString
(
p
))
!=
p
&&
sp
)
strcpy
(
p
,
sp
);
vp
=
new
(
g
)
TYPVAL
<
PSZ
>
(
g
,
p
,
valp
->
GetValLen
(),
valp
->
GetValPrec
());
...
...
@@ -1219,7 +1219,7 @@ TYPVAL<PSZ>::TYPVAL(PSZ s) : VALUE(TYPE_STRING)
TYPVAL
<
PSZ
>::
TYPVAL
(
PGLOBAL
g
,
PSZ
s
,
int
n
,
int
c
)
:
VALUE
(
TYPE_STRING
)
{
Len
=
(
g
)
?
n
:
strlen
(
s
)
;
Len
=
(
g
)
?
n
:
(
s
)
?
strlen
(
s
)
:
0
;
if
(
!
s
)
{
if
(
g
)
{
...
...
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