Must check the storage boundary in find_contiguous_pages.

This commit is contained in:
nvt-se 2011-01-25 18:39:09 +00:00
parent 09c223f549
commit faab7229c9

View File

@ -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 --