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>
pull/1486/head
Evgeny Vereshchagin 1 year ago
parent 0a08200bd5
commit 58c3bc12a5
  1. 4
      libmount/src/fuzz.c

@ -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();

Loading…
Cancel
Save