diff --git a/WHATS_NEW b/WHATS_NEW index 345c4720c..897576c69 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.178 - ===================================== + Avoid exceeding array bounds in allocation tag processing. Refactor metadata reading code to use callback functions. Move memory allocation for the key dev_reads into the device layer. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 70dc2d92c..ac30dadeb 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -2737,7 +2737,8 @@ static int _limit_to_one_area_per_tag(struct alloc_handle *ah, struct alloc_stat s++; } - alloc_state->areas[u].pva = NULL; + if (u < alloc_state->areas_size) + alloc_state->areas[u].pva = NULL; return 1; }