summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_elf.c
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2001-08-18 04:24:30 +0000
committermp <mp@FreeBSD.org>2001-08-18 04:24:30 +0000
commit95b64737b7f4cb499936bd0af68d59f0de68fbdb (patch)
treed289b778cb1b4fbb80a6f31167348c10551a8e73 /sys/kern/imgact_elf.c
parent8f9d0c3e4f18972234061c0378040c8f2173b1cb (diff)
downloadFreeBSD-src-95b64737b7f4cb499936bd0af68d59f0de68fbdb.zip
FreeBSD-src-95b64737b7f4cb499936bd0af68d59f0de68fbdb.tar.gz
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
Diffstat (limited to 'sys/kern/imgact_elf.c')
-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 f503bf5..96aeafd 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) {
OpenPOWER on IntegriCloud