fuzz: restrict manifest input size
Again, let's keep the fuzzer from getting excited about huge inputs.
Differential Revision: https://phab.mercurial-scm.org/D5642
--- a/contrib/fuzz/manifest.cc Tue Jan 22 11:02:10 2019 -0500
+++ b/contrib/fuzz/manifest.cc Tue Jan 22 11:41:09 2019 -0500
@@ -39,6 +39,11 @@
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
+ // Don't allow fuzzer inputs larger than 100k, since we'll just bog
+ // down and not accomplish much.
+ if (Size > 100000) {
+ return 0;
+ }
PyObject *mtext =
PyBytes_FromStringAndSize((const char *)Data, (Py_ssize_t)Size);
PyObject *locals = PyDict_New();