/*
 * Copyright 2020 Richard Hughes <richard@hughsie.com>
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include "config.h"

#include "fu-fuzzer.h"

#include "@INCLUDE@"

int
LLVMFuzzerTestOneInput(const guint8 *data, gsize size)
{
	g_autoptr(GObject) object = g_object_new(@GTYPE@, NULL);
	g_autoptr(GBytes) blob = g_bytes_new_static(data, size);

	(void)g_setenv("G_DEBUG", "fatal-criticals", TRUE);
	(void)g_setenv("FWUPD_FUZZER_RUNNING", "1", TRUE);

	fu_fuzzer_test_input(FU_FUZZER(object), blob, NULL);
	return 0;
}
