mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
allocation: Avoid exceeding array bounds in allocation tag code
If _limit_to_one_area_per_tag() changes nothing it writes beyond the array.
This commit is contained in:
parent
e2438b5b9f
commit
bacc942333
@ -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.
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user