Unverified Commit b405dec6 by Christian Brauner Committed by GitHub

Merge pull request #3760 from evverx/reject-giant-configs

oss-fuzz: reject giant configs early
parents f5312e35 e7e0343f
......@@ -13,6 +13,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
char tmpf[] = "/tmp/fuzz-lxc-config-read-XXXXXX";
struct lxc_conf *conf = NULL;
/*
* 100Kb should probably be enough to trigger all the issues
* we're interested in without any timeouts
*/
if (size > 102400)
return 0;
fd = lxc_make_tmpfile(tmpf, false);
lxc_test_assert_abort(fd >= 0);
lxc_write_nointr(fd, data, size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment