[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] ioemu: save file name is snprintf()ed into a plenty big enough buffer.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1181326928 -3600 # Node ID 6d6b4b48773b7776e3762b998f23cd553f55f8ee # Parent b0109d3dc3dd962e6555d2fc588033d1f4cc9e2e ioemu: save file name is snprintf()ed into a plenty big enough buffer. From: Daniel P. Berrange <berrange@xxxxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- tools/ioemu/target-i386-dm/helper2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -r b0109d3dc3dd -r 6d6b4b48773b tools/ioemu/target-i386-dm/helper2.c --- a/tools/ioemu/target-i386-dm/helper2.c Fri Jun 08 17:37:58 2007 +0100 +++ b/tools/ioemu/target-i386-dm/helper2.c Fri Jun 08 19:22:08 2007 +0100 @@ -616,7 +616,7 @@ int main_loop(void) extern int suspend_requested; CPUState *env = cpu_single_env; int evtchn_fd = xc_evtchn_fd(xce_handle); - char qemu_file[32]; + char qemu_file[PATH_MAX]; buffered_io_timer = qemu_new_timer(rt_clock, handle_buffered_io, cpu_single_env); @@ -635,7 +635,7 @@ int main_loop(void) main_loop_wait(1); /* For the select() on events */ /* Save the device state */ - sprintf(qemu_file, "/var/lib/xen/qemu-save.%d", domid); + snprintf(qemu_file, sizeof(qemu_file), "/var/lib/xen/qemu-save.%d", domid); do_savevm(qemu_file); return 0; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |