mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
zdb: fencepost error at zdb_cb.zcb_embedded_histogram[][]
Erroneous access detected by gcc UndefinedBehaviorSanitizer: `zdb.c:2424:7: runtime error: index 112 out of bounds for type 'uint64_t [112]'` Fix: increase histogram size by 1 to accommodate all possible sizes. Signed-off-by: Gvozden Neskovic <neskovic@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #4934 Issue #4883
This commit is contained in:
parent
fc897b24b2
commit
f0c26069bd
@ -2354,7 +2354,7 @@ typedef struct zdb_cb {
|
||||
uint64_t zcb_dedup_blocks;
|
||||
uint64_t zcb_embedded_blocks[NUM_BP_EMBEDDED_TYPES];
|
||||
uint64_t zcb_embedded_histogram[NUM_BP_EMBEDDED_TYPES]
|
||||
[BPE_PAYLOAD_SIZE];
|
||||
[BPE_PAYLOAD_SIZE + 1];
|
||||
uint64_t zcb_start;
|
||||
uint64_t zcb_lastprint;
|
||||
uint64_t zcb_totalasize;
|
||||
|
Loading…
Reference in New Issue
Block a user