diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2023-12-06 13:51:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 13:51:25 +0200 |
commit | 1bad78f37806aeddb9a2b1147360c9dc75b27d8d (patch) | |
tree | 6d814245520cf4e652f64a0724f45f2b0eb2aee9 /database/engine/pdc.c | |
parent | 246e32e270c86cd68d8db48b2b49e8cd25f2bc73 (diff) |
Improve page validity check during database extent load (#16552)
Pages with type 2 (gorilla compression) can be > 4096 bytes in multiples of GORILLA PAGE SIZE
Diffstat (limited to 'database/engine/pdc.c')
-rw-r--r-- | database/engine/pdc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/database/engine/pdc.c b/database/engine/pdc.c index bdd36809a2..5fe205e645 100644 --- a/database/engine/pdc.c +++ b/database/engine/pdc.c @@ -998,7 +998,9 @@ static bool epdl_populate_pages_from_extent_data( uncompressed_payload_length = 0; for (i = 0; i < count; ++i) { size_t page_length = header->descr[i].page_length; - if(page_length > RRDENG_BLOCK_SIZE) { + if (page_length > RRDENG_BLOCK_SIZE && (header->descr[i].type != PAGE_GORILLA_METRICS || + (header->descr[i].type == PAGE_GORILLA_METRICS && + (page_length - RRDENG_BLOCK_SIZE) % GORILLA_BUFFER_SIZE))) { have_read_error = true; break; } |