Commit b28adb6a authored by Marko Mäkelä's avatar Marko Mäkelä

Fix an error introduced in the previous commit.

fil_parse_write_crypt_data(): Correct the comparison operator.
This was broken in commit 498f4a82
which removed a signed/unsigned mismatch in these comparisons.
parent 498f4a82
...@@ -473,7 +473,7 @@ fil_parse_write_crypt_data( ...@@ -473,7 +473,7 @@ fil_parse_write_crypt_data(
4 + // size of key_id 4 + // size of key_id
1; // fil_encryption_t 1; // fil_encryption_t
if (ptr + entry_size < end_ptr) { if (ptr + entry_size > end_ptr) {
return NULL; return NULL;
} }
...@@ -499,7 +499,7 @@ fil_parse_write_crypt_data( ...@@ -499,7 +499,7 @@ fil_parse_write_crypt_data(
fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(ptr); fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(ptr);
ptr +=1; ptr +=1;
if (ptr + len < end_ptr) { if (ptr + len > end_ptr) {
return NULL; return NULL;
} }
......
...@@ -473,7 +473,7 @@ fil_parse_write_crypt_data( ...@@ -473,7 +473,7 @@ fil_parse_write_crypt_data(
4 + // size of key_id 4 + // size of key_id
1; // fil_encryption_t 1; // fil_encryption_t
if (ptr + entry_size < end_ptr) { if (ptr + entry_size > end_ptr) {
return NULL; return NULL;
} }
...@@ -499,7 +499,7 @@ fil_parse_write_crypt_data( ...@@ -499,7 +499,7 @@ fil_parse_write_crypt_data(
fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(ptr); fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(ptr);
ptr +=1; ptr +=1;
if (ptr + len < end_ptr) { if (ptr + len > end_ptr) {
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment