This case was written to use hardcoded /tmp directory for temporary
files. Update to use g_dir_make_tmp() for a portable implementation.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20220925113032.
1949844-11-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
} generic_fuzz_config;
static inline gchar *generic_fuzzer_virtio_9p_args(void){
- char tmpdir[] = "/tmp/qemu-fuzz.XXXXXX";
- g_assert_nonnull(g_mkdtemp(tmpdir));
+ g_autofree char *tmpdir = g_dir_make_tmp("qemu-fuzz.XXXXXX", NULL);
+ g_assert_nonnull(tmpdir);
return g_strdup_printf("-machine q35 -nodefaults "
"-device virtio-9p,fsdev=hshare,mount_tag=hshare "