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
a1232645
Commit
a1232645
authored
Mar 13, 2016
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check to avoid NULL-pointer access if encryption information
is not available. Clarify system tablespace page 0 check.
parent
f341d944
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
storage/innobase/fil/fil0crypt.cc
storage/innobase/fil/fil0crypt.cc
+3
-3
storage/xtradb/fil/fil0crypt.cc
storage/xtradb/fil/fil0crypt.cc
+3
-3
No files found.
storage/innobase/fil/fil0crypt.cc
View file @
a1232645
...
...
@@ -662,7 +662,7 @@ fil_space_encrypt(
return
src_frame
;
}
ut_a
d
(
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
ut_a
(
crypt_data
!=
NULL
&&
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
byte
*
tmp
=
fil_encrypt_buf
(
crypt_data
,
space
,
offset
,
lsn
,
src_frame
,
zip_size
,
dst_frame
);
...
...
@@ -722,7 +722,7 @@ fil_space_decrypt(
}
if
(
crypt_data
==
NULL
)
{
if
(
space
!=
0
&&
offset
!=
0
&&
key_version
!=
0
)
{
if
(
!
(
space
==
0
&&
offset
==
0
)
&&
key_version
!=
0
)
{
/* FIL_PAGE_FILE_FLUSH_LSN field i.e.
FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
should be only defined for the
...
...
@@ -740,7 +740,7 @@ fil_space_decrypt(
return
false
;
}
ut_a
d
(
crypt_data
!=
NULL
&&
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
ut_a
(
crypt_data
!=
NULL
&&
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
/* read space & lsn */
ulint
header_len
=
FIL_PAGE_DATA
;
...
...
storage/xtradb/fil/fil0crypt.cc
View file @
a1232645
...
...
@@ -662,7 +662,7 @@ fil_space_encrypt(
return
src_frame
;
}
ut_a
d
(
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
ut_a
(
crypt_data
!=
NULL
&&
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
byte
*
tmp
=
fil_encrypt_buf
(
crypt_data
,
space
,
offset
,
lsn
,
src_frame
,
zip_size
,
dst_frame
);
...
...
@@ -722,7 +722,7 @@ fil_space_decrypt(
}
if
(
crypt_data
==
NULL
)
{
if
(
space
!=
0
&&
offset
!=
0
&&
key_version
!=
0
)
{
if
(
!
(
space
==
0
&&
offset
==
0
)
&&
key_version
!=
0
)
{
/* FIL_PAGE_FILE_FLUSH_LSN field i.e.
FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
should be only defined for the
...
...
@@ -740,7 +740,7 @@ fil_space_decrypt(
return
false
;
}
ut_a
d
(
crypt_data
!=
NULL
&&
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
ut_a
(
crypt_data
!=
NULL
&&
crypt_data
->
encryption
!=
FIL_SPACE_ENCRYPTION_OFF
);
/* read space & lsn */
ulint
header_len
=
FIL_PAGE_DATA
;
...
...
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