sanity check on configure_log parameters
This commit is contained in:
parent
acfe78a51a
commit
ccd492f687
|
@ -1074,6 +1074,10 @@ cfs_coffee_configure_log(const char *file, unsigned log_size, unsigned log_entry
|
|||
coffee_page_t page;
|
||||
struct file_header hdr;
|
||||
|
||||
if(log_entry_size > COFFEE_PAGE_SIZE || log_size < log_entry_size) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
page = find_file(file);
|
||||
if(page < 0) {
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue