Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
microzap: set hard upper limit of 1M
The count of chunks in a microzap block is stored as an int16_t (zap_num_chunks). Each chunk is 64 bytes, and the first is used to store a header, so there are 32767 usable chunks, which is just under 2M. 1M is the largest power-2-rounded block size under 2M, so we must set the limit there. If it goes higher, the loop in mzap_addent can overflow and fall into the PANIC case. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris <[email protected]>
- Loading branch information