Must check the storage boundary in find_contiguous_pages.
This commit is contained in:
parent
09c223f549
commit
faab7229c9
@ -515,6 +515,10 @@ find_contiguous_pages(coffee_page_t amount)
|
||||
if(HDR_FREE(hdr)) {
|
||||
if(start == INVALID_PAGE) {
|
||||
start = page;
|
||||
if(start + amount >= COFFEE_PAGE_COUNT) {
|
||||
/* We can stop immediately if the remaining pages are not enough. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* All remaining pages in this sector are free --
|
||||
|
Loading…
Reference in New Issue
Block a user