Commit 912c59c9 by Nelson Elhage

while fuzzing, limit # objects read

parent 6dfc8bc2
......@@ -563,6 +563,11 @@ int git_indexer_append(git_indexer *idx, const void *data, size_t size, git_tran
total_objects = (unsigned int)idx->nr_objects;
else
total_objects = UINT_MAX;
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
if (total_objects > 4096) {
total_objects = 4096;
}
#endif
idx->pack->idx_cache = git_oidmap_alloc();
GITERR_CHECK_ALLOC(idx->pack->idx_cache);
......
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