aboutsummaryrefslogtreecommitdiff
path: root/slirp/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/misc.c')
-rw-r--r--slirp/misc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/slirp/misc.c b/slirp/misc.c
index 337f8a8574..032a1f7b1f 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -417,8 +417,9 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
{
char buff[256];
- sprintf(buff, "Error: execvp of %s failed: %s\n",
- argv[0], strerror(errno));
+ snprintf(buff, sizeof(buff),
+ "Error: execvp of %s failed: %s\n",
+ argv[0], strerror(errno));
write(2, buff, strlen(buff)+1);
}
close(0); close(1); close(2); /* XXX */