1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix an error introduced in the previous commit.

fil_parse_write_crypt_data(): Correct the comparison operator.
This was broken in commit 498f4a825b
which removed a signed/unsigned mismatch in these comparisons.
This commit is contained in:
Marko Mäkelä
2017-03-09 15:09:44 +02:00
parent 498f4a825b
commit b28adb6a62
2 changed files with 4 additions and 4 deletions

View File

@@ -473,7 +473,7 @@ fil_parse_write_crypt_data(
4 + // size of key_id
1; // fil_encryption_t
if (ptr + entry_size < end_ptr) {
if (ptr + entry_size > end_ptr) {
return NULL;
}
@@ -499,7 +499,7 @@ fil_parse_write_crypt_data(
fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(ptr);
ptr +=1;
if (ptr + len < end_ptr) {
if (ptr + len > end_ptr) {
return NULL;
}

View File

@@ -473,7 +473,7 @@ fil_parse_write_crypt_data(
4 + // size of key_id
1; // fil_encryption_t
if (ptr + entry_size < end_ptr) {
if (ptr + entry_size > end_ptr) {
return NULL;
}
@@ -499,7 +499,7 @@ fil_parse_write_crypt_data(
fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(ptr);
ptr +=1;
if (ptr + len < end_ptr) {
if (ptr + len > end_ptr) {
return NULL;
}