]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-ga.c
sun4u: Pass SPARCCPU to cpu_kick_irq()
[mirror_qemu.git] / qemu-ga.c
index daeaea54619dafc3c3302d9cdf4de8e65dc2ed1f..9b59a524619cab1f25ff3ae87a1ee2227785f1be 100644 (file)
--- a/qemu-ga.c
+++ b/qemu-ga.c
@@ -255,7 +255,7 @@ static bool ga_open_pidfile(const char *pidfile)
         g_critical("Failed to truncate pid file");
         goto fail;
     }
-    sprintf(pidstr, "%d", getpid());
+    snprintf(pidstr, sizeof(pidstr), "%d\n", getpid());
     if (write(pidfd, pidstr, strlen(pidstr)) != strlen(pidstr)) {
         g_critical("Failed to write pid file");
         goto fail;