void do_flatten_cache(const char *cache_dir)
{
	gf_enum_directory(cache_dir, GF_FALSE, revert_cache_file, NULL, "*.txt");
}

The product writes data past the end, or before the beginning, of the intended buffer.