From eba2af633fb8fa3b20ad578184d79e1f0eabcefe Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 19 Jun 2004 17:23:39 +0000 Subject: buffer overflow fix git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@932 c046a42c-6fe2-441c-8c8c-71466251a162 --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 899e085c57..21261e2c0c 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1067,7 +1067,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * r char * passed_p; if (interpreter_type == INTERPRETER_AOUT) { - sprintf(passed_fileno, "%d", bprm->fd); + snprintf(passed_fileno, sizeof(passed_fileno), "%d", bprm->fd); passed_p = passed_fileno; if (elf_interpreter) { -- cgit v1.2.3