From patchwork Fri Nov 27 16:27:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Champetier X-Patchwork-Id: 549536 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 84CF5140319 for ; Sat, 28 Nov 2015 03:44:41 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=NvoWuxGe; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C44FE28C16D; Fri, 27 Nov 2015 17:33:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 0063B28BE3D for ; Fri, 27 Nov 2015 17:29:04 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 27 Nov 2015 17:27:31 +0100 (CET) Received: by wmww144 with SMTP id w144so64133335wmw.0 for ; Fri, 27 Nov 2015 08:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zIhFvVkVGjiLXMDrIRnKl/RGRxe80Skm1vs6S32HcTs=; b=NvoWuxGevmwAWsoXD1EHmjI3nNxXtmStPM0PwRSGFgU02jpW/pprDLgFQFvJ8WnNBS TW6fJJsbTxRz/A+G5DnQACGrWFYgIOlEd9nL2blqni+CW+tnIK2dZpqD26vkzItwlx2j W4+cJ9dAMkSw7ATtt8//80Fv2QTPpkGbatmftdk8vG5eJmKHxqZvcMM+PAgo3TjVPEw7 C3Rg/ws3dnT1G1JgRuvVeQ0o3vKq4x3ly+I6hWxxZJhVZy/Kblxw8XeLttcH+jC+n2w8 JkzpkXEV4dp8hVkWJkGjXKvUMQzVHa+OA7HeDpdCgHKiNK4PIusB28txItskWutc95r0 zwbQ== X-Received: by 10.28.183.215 with SMTP id h206mr12554869wmf.0.1448641652901; Fri, 27 Nov 2015 08:27:32 -0800 (PST) Received: from ubuntu1404.lxcnattst (ns623510.ovh.net. [5.135.134.9]) by smtp.gmail.com with ESMTPSA id w67sm8170842wmw.17.2015.11.27.08.27.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Nov 2015 08:27:32 -0800 (PST) From: Etienne CHAMPETIER To: OpenWrt Development List Date: Fri, 27 Nov 2015 16:27:13 +0000 Message-Id: <1448641636-42493-15-git-send-email-champetier.etienne@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448641636-42493-1-git-send-email-champetier.etienne@gmail.com> References: <1448641636-42493-1-git-send-email-champetier.etienne@gmail.com> Subject: [OpenWrt-Devel] [PATCH procd v3 14/17] ujail: DT_STRTAB uses d_ptr in d_un union (not d_val) X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" see https://docs.oracle.com/cd/E19683-01/817-3677/chapter6-42444/index.html Signed-off-by: Etienne CHAMPETIER --- jail/elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jail/elf.c b/jail/elf.c index 7c52880..46c19df 100644 --- a/jail/elf.c +++ b/jail/elf.c @@ -182,7 +182,7 @@ static int elf32_scan_dynamic(const char *map, int dyn_offset, int dyn_size, int if (curr->d_tag != DT_STRTAB) continue; - strtab = map + (curr->d_un.d_val - load_offset); + strtab = map + (curr->d_un.d_ptr - load_offset); break; } @@ -216,7 +216,7 @@ static int elf64_scan_dynamic(const char *map, int dyn_offset, int dyn_size, int if (curr->d_tag != DT_STRTAB) continue; - strtab = map + (curr->d_un.d_val - load_offset); + strtab = map + (curr->d_un.d_ptr - load_offset); break; }