mount_fuzz: reject giant files early

It should help to address https://github.com/google/oss-fuzz/issues/6703

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
This commit is contained in:
Evgeny Vereshchagin 2021-10-30 18:09:30 +00:00
parent 0a08200bd5
commit 58c3bc12a5
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size == 0)
return 0;
// 128Kb should be enough to trigger all the issues we're interested in
if (size > 131072)
return 0;
tb = mnt_new_table();
if (!tb)
err_oom();