mirror of
https://github.com/freemkv/freemkv-keysources.git
synced 2026-10-07 18:13:11 +00:00
Raise keydb size cap 64 MiB -> 128 MiB
The public UHD keydb is ~62 MiB and growing, leaving only ~2 MiB under the old 64 MiB ceiling — updates would start failing as it grows. 128 MiB restores years of headroom while still bounding a decompression bomb. Both cap sites (keydb.rs download/save, keydb_format.rs on-disk load) bumped; the unrelated MKB cap in online.rs is untouched.
This commit is contained in:
+4
-3
@@ -23,9 +23,10 @@ use libfreemkv::aacs::types::{DeviceKey, HostCert};
|
||||
pub type NumberedUnitKey = (u32, [u8; 16]);
|
||||
|
||||
/// Upper bound on the on-disk keydb.cfg size accepted by [`KeyDb::load`].
|
||||
/// The real public UHD keydb is a few MiB; 64 MiB is generous headroom while
|
||||
/// still bounding the worst-case allocation from a hostile/corrupt file.
|
||||
const MAX_KEYDB_BYTES: u64 = 64 * 1024 * 1024;
|
||||
/// The public UHD keydb (fvonline) is ~62 MiB and growing; 128 MiB is generous
|
||||
/// headroom while still bounding the worst-case allocation from a hostile or
|
||||
/// corrupt file.
|
||||
const MAX_KEYDB_BYTES: u64 = 128 * 1024 * 1024;
|
||||
|
||||
/// Upper bound on parsed disc entries. The real public keydb carries
|
||||
/// ~170k+ entries, so the cap sits well above that while still bounding
|
||||
|
||||
Reference in New Issue
Block a user