Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 2021 02:44:33 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c35b12cc7dfb - stable/13 - exec_elf: use intermediate u_long variable to correct mismatched type
Message-ID:  <202112190244.1BJ2iXdH012715@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=c35b12cc7dfb3070c418527d9309427ef17f15bc

commit c35b12cc7dfb3070c418527d9309427ef17f15bc
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-12-12 16:47:26 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-12-19 02:42:51 +0000

    exec_elf: use intermediate u_long variable to correct mismatched type
    
    (cherry picked from commit e499988f0cc45ad2e21573b6d11c9cefdd37608d)
---
 sys/kern/imgact_elf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 0f42017cb7ef..567c1094bfdc 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -1092,7 +1092,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
 	Elf_Brandinfo *brand_info;
 	struct sysentvec *sv;
 	u_long addr, baddr, et_dyn_addr, entry, proghdr;
-	u_long maxalign, maxsalign, mapsz, maxv, maxv1;
+	u_long maxalign, maxsalign, mapsz, maxv, maxv1, anon_loc;
 	uint32_t fctl0;
 	int32_t osrel;
 	bool free_interp;
@@ -1335,9 +1335,10 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
 		maxv1 = maxv / 2 + addr / 2;
 		error = __CONCAT(rnd_, __elfN(base))(map, addr, maxv1,
 		    (MAXPAGESIZES > 1 && pagesizes[1] != 0) ?
-		    pagesizes[1] : pagesizes[0], &map->anon_loc);
+		    pagesizes[1] : pagesizes[0], &anon_loc);
 		if (error != 0)
 			goto ret;
+		map->anon_loc = anon_loc;
 	} else {
 		map->anon_loc = addr;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112190244.1BJ2iXdH012715>