aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Peek <mp@FreeBSD.org>2001-08-18 04:24:30 +0000
committerMark Peek <mp@FreeBSD.org>2001-08-18 04:24:30 +0000
commit29b7fbd17f641e56ce54f186c49599d89cbf6ea3 (patch)
treed289b778cb1b4fbb80a6f31167348c10551a8e73
parent4faa812afae60b819dd4711c70e4e112922486e4 (diff)
downloadsrc-29b7fbd17f641e56ce54f186c49599d89cbf6ea3.tar.gz
src-29b7fbd17f641e56ce54f186c49599d89cbf6ea3.zip
Unbreak linux compatibility by providing the correct length of the buffer.
Reported by: "Pierre Y. Dampure" <pierre.dampure@westmarsh.com>, "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk> Pointy hat to: mp
Notes
Notes: svn path=/head/; revision=81881
-rw-r--r--sys/kern/imgact_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index f503bf527c15..96aeafdacc41 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -644,7 +644,7 @@ exec_elf_imgact(struct image_params *imgp)
imgp->proc->p_sysent = brand_info->sysvec;
if (interp != NULL) {
path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
- snprintf(path, sizeof(path), "%s%s",
+ snprintf(path, MAXPATHLEN, "%s%s",
brand_info->emul_path, interp);
if ((error = elf_load_file(imgp->proc, path, &addr,
&imgp->entry_addr)) != 0) {