From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MOZTMa+UaWdGewAAqHPOHw:P1 (envelope-from ) for ; Mon, 23 Dec 2024 16:49:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MOZTMa+UaWdGewAAqHPOHw (envelope-from ) for ; Mon, 23 Dec 2024 17:49:51 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=eoW2SPnu; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734972591; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=zCEGxRgXKJLp2isDdg2x6l36AnwCalRVNC4nYYEneAg=; b=iigns/b6+XlQzoxmlFK+8BNCStFmk7iA1E8Oq/d5E2IESLjM3DYbIsAlwQF4OmOwtKJZaR 2ztPkh7vovw3N1QDx7ue2qn5e2EBxtPcLFDfwWYUdE063v7yDC295UgFGC6+1y+rRBT8t4 WUQJihzLQh8eXr9bYCat9P5jLwemUhwi+MXeH3YL5hoz+a4jMjugaFPO+alrPVVrHImlZd G+U/BSSoGPYaVe29SqugUOHQr5eVsL0S9ZYJyWrz39Tna0wdE1peUsqajJS8BhlDI3ej16 fUVqG+68MSDwOCMKoXqxcfvV8m+4Tc6uK/VGB5S4p/cobSfsjX8Ig4PLf69IoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=eoW2SPnu; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734972591; a=rsa-sha256; cv=none; b=Lj/8vXuBz5znCRCDGyFPkZLXwurQ7aTpxoCroS5Yg1C7k4B1V3Kx1e3TOSVSvDeGFVCeUX FhAcrt7W3KbIzcO32zlIu0ni38BCYeKNxtFb7Re6HIwaVmWUHutFXlY/2eoc9I4Cam9P3O rzvtOn6MTp9axOKM6l2/+CQWibiYBDsOTH5iK0LzEeNi1FEuynLkrqXUQ4+YN+4xGvQZUh Uhe4AXQxPLgXF+eTtR0jF4Bf4ZQ4QhUmeZHmfwCBz/4y++q+uuf7icr3gCI5D+COXH+xmb sLW/l+FZhaWrnAcuSsIwF7tuJBQ0cDxLVO5Ie6Wzi8WjTGuyBS3m+RLV6i2rMQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2448887F62 for ; Mon, 23 Dec 2024 17:49:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPlcK-00014x-Gp; Mon, 23 Dec 2024 11:49:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPlc7-00014C-B0 for guix-patches@gnu.org; Mon, 23 Dec 2024 11:49:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tPlc6-0006RL-U0 for guix-patches@gnu.org; Mon, 23 Dec 2024 11:49:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=zCEGxRgXKJLp2isDdg2x6l36AnwCalRVNC4nYYEneAg=; b=eoW2SPnuvsngYpnurBSypJDGQrz8r9Hx36L55JKc3zeYc/fqNdKPN+EvVQwdWO8SMqJ+neGRU1rSdRY1zmssQVydRc5qhKZUXzwbz6voSmOLdjToZ0oEZ6+3iEpLtq8NGZ0UbmtzmQ7SSY50CfGVyMLlDtUEvzt+p2oQTItfN69ZUGzaauPwax80ztQCatOyw8OUUV/+DxymIAIsqo8ZmUWGG9SQCiEJfswtfklvnPDpqurKuO0KRMe0hciUE/6fXDRpyPloxNqK5IxqQG3DMtxotZL2vY4c9+nmne8TYUMIHAlg6d9+bUmmHYIBmil66aBWHGb2wpVIqPw63zH/kw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tPlc6-0006np-HD for guix-patches@gnu.org; Mon, 23 Dec 2024 11:49:02 -0500 Subject: bug#74669: [PATCH v3] gnu: elfutils: Fix cross-compilation. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Mon, 23 Dec 2024 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74669 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74669-done@debbugs.gnu.org Mail-Followup-To: 74669@debbugs.gnu.org, zhengjunjie@iscas.ac.cn, zhengjunjie@iscas.ac.cn Received: via spool by 74669-done@debbugs.gnu.org id=D74669.173497248626062 (code D ref 74669); Mon, 23 Dec 2024 16:49:02 +0000 Received: (at 74669-done) by debbugs.gnu.org; 23 Dec 2024 16:48:06 +0000 Received: from localhost ([127.0.0.1]:55798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPlbB-0006mH-5u for submit@debbugs.gnu.org; Mon, 23 Dec 2024 11:48:06 -0500 Received: from smtp81.cstnet.cn ([159.226.251.81]:57494 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPlb5-0006lb-Am for 74669-done@debbugs.gnu.org; Mon, 23 Dec 2024 11:48:03 -0500 Received: from m (unknown [107.174.64.25]) by APP-03 (Coremail) with SMTP id rQCowADX3g4olGln5N+YAw--.10735S2; Tue, 24 Dec 2024 00:47:40 +0800 (CST) From: Zheng Junjie In-Reply-To: <1f088473ff01e785e8a8b3414f831dc6b1fe6841.1734095153.git.zhengjunjie@iscas.ac.cn> (Zheng Junjie's message of "Fri, 13 Dec 2024 21:05:53 +0800") References: <814be590b438138df7b35507a0fd266b319da388.1733228331.git.zhengjunjie@iscas.ac.cn> <1f088473ff01e785e8a8b3414f831dc6b1fe6841.1734095153.git.zhengjunjie@iscas.ac.cn> User-Agent: mu4e 1.12.7; emacs 30.0.92 Date: Tue, 24 Dec 2024 00:47:34 +0800 Message-ID: <87cyhipcrd.fsf@iscas.ac.cn> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: rQCowADX3g4olGln5N+YAw--.10735S2 X-Coremail-Antispam: 1UD129KBjvJXoWfGw1xWFy7Zw4fGrW3tr43ZFb_yoWDuryxp3 y3ArnYv3yxJrnxJanxXFnFkwn5G3s7CFWY9r9xGw1vyF45XF1xXrWxKryrCayUuryku3ya 9wsYqayfAF98WFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvlb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I 8E87Iv6xkF7I0E14v26r4j6r4UJwAa7VASzI0EjI02j7AqF2xKxVCjxxvEa2IrM2AIxVAI cxkEcVAq07x20xvEncxIr21le4C267I2x7xF54xIwI1l5I8CrVACY4xI64kE6c02F40Ex7 xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Y z7v_Jr0_Gr1lF7xvr2IY64vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr 0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY 17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcV C0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY 6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvj DU0xZFpf9x07jEOJOUUUUU= X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -11.98 X-Spam-Score: -11.98 X-Migadu-Queue-Id: 2448887F62 X-TUID: PsnpSU+Ey9Ts --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Zheng Junjie writes: > * gnu/packages/elf.scm (elfutils): Fix cross-compilation > [arguments]: When cross-compilation, apply patch. > <#:phases>: Use G-expressions. > * gnu/packages/patches/elfutils-libdwfl-string-overflow.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register it. > > Change-Id: Ia1ab9c09124a140608bda34bf62f0ae80eb44f9b > --- > gnu/local.mk | 1 + > gnu/packages/elf.scm | 94 +++++++------- > .../elfutils-libdwfl-string-overflow.patch | 116 ++++++++++++++++++ > 3 files changed, 169 insertions(+), 42 deletions(-) > create mode 100644 gnu/packages/patches/elfutils-libdwfl-string-overflow= .patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index 39b142af5a..67d0085b71 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -1177,6 +1177,7 @@ dist_patch_DATA =3D \ > %D%/packages/patches/eigen-fix-strict-aliasing-bug.patch \ > %D%/packages/patches/einstein-build.patch \ > %D%/packages/patches/elfutils-tests-ptrace.patch \ > + %D%/packages/patches/elfutils-libdwfl-string-overflow.patch \ > %D%/packages/patches/elixir-path-length.patch \ > %D%/packages/patches/elm-ghc9.2.patch \ > %D%/packages/patches/elm-offline-package-registry.patch \ > diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm > index 81a753a483..8f036ab221 100644 > --- a/gnu/packages/elf.scm > +++ b/gnu/packages/elf.scm > @@ -11,6 +11,7 @@ > ;;; Copyright =C2=A9 2021 Leo Le Bouter > ;;; Copyright =C2=A9 2021 Maxime Devos > ;;; Copyright =C2=A9 2023, 2024 Janneke Nieuwenhuizen > +;;; Copyright =C2=A9 2024 Zheng Junjie <873216071@qq.com> > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -99,48 +100,57 @@ (define-public elfutils > '()) >=20=20 > #:phases > - (modify-phases %standard-phases > - ;; No reason has been found for this test to reliably fail on a= arch64-linux. > - (add-after 'unpack 'disable-failing-aarch64-tests > - (lambda _ > - (substitute* "tests/Makefile.in" > - (("run-backtrace-native.sh") "")) > - #t)) > - ,@(if (target-riscv64?) > - `((add-after 'unpack 'disable-failing-riscv64-test > - (lambda _ > - (substitute* "tests/Makefile.in" > - ;; dwfl_thread_getframes: No DWARF information found > - (("run-backtrace-dwarf.sh") "") > - ;; These tests have several errors: > - ;; unknown program header entry type 0x70000003 > - ;; '.riscv.attributes' has unsupported type 1879048= 195 > - (("run-reverse-sections-self.sh") "") > - (("run-strip-strmerge.sh") "") > - (("run-elflint-self.sh") ""))))) > - '()) > - ,@(if (system-hurd?) > - `((add-after 'unpack 'skip-tests > - (lambda _ > - (substitute* '("tests/elfstrtab.c" > - "tests/emptyfile.c") > - (("elf_version \\(EV_CURRENT\\);" all) > - "exit (77);")) > - (substitute* '("tests/run-all-dwarf-ranges.sh" > - "tests/run-allfcts-multi.sh" > - "tests/run-attr-integrate-skel.sh" > - "tests/run-bug1-test.sh" > - "tests/run-copyadd-sections.sh" > - "tests/run-deleted.sh" > - "tests/run-get-units-split.sh" > - "tests/run-native-test.sh" > - "tests/run-readelf-loc.sh" > - "tests/run-readelf-ranges.sh" > - "tests/run-unit-info.sh" > - "tests/run-varlocs.sh") > - (("^#!.*" all) > - (string-append all "exit 77;\n")))))) > - '())))) > + ,#~(modify-phases %standard-phases > + ;; No reason has been found for this test to reliably fail o= n aarch64-linux. > + (add-after 'unpack 'disable-failing-aarch64-tests > + (lambda _ > + (substitute* "tests/Makefile.in" > + (("run-backtrace-native.sh") "")) > + #t)) > + #$@(if (target-riscv64?) > + #~((add-after 'unpack 'disable-failing-riscv64-test > + (lambda _ > + (substitute* "tests/Makefile.in" > + ;; dwfl_thread_getframes: No DWARF informati= on found > + (("run-backtrace-dwarf.sh") "") > + ;; These tests have several errors: > + ;; unknown program header entry type 0x70000= 003 > + ;; '.riscv.attributes' has unsupported type = 1879048195 > + (("run-reverse-sections-self.sh") "") > + (("run-strip-strmerge.sh") "") > + (("run-elflint-self.sh") ""))))) > + #~()) > + #$@(if (system-hurd?) > + #~((add-after 'unpack 'skip-tests > + (lambda _ > + (substitute* '("tests/elfstrtab.c" > + "tests/emptyfile.c") > + (("elf_version \\(EV_CURRENT\\);" all) > + "exit (77);")) > + (substitute* '("tests/run-all-dwarf-ranges.sh" > + "tests/run-allfcts-multi.sh" > + "tests/run-attr-integrate-skel.= sh" > + "tests/run-bug1-test.sh" > + "tests/run-copyadd-sections.sh" > + "tests/run-deleted.sh" > + "tests/run-get-units-split.sh" > + "tests/run-native-test.sh" > + "tests/run-readelf-loc.sh" > + "tests/run-readelf-ranges.sh" > + "tests/run-unit-info.sh" > + "tests/run-varlocs.sh") > + (("^#!.*" all) > + (string-append all "exit 77;\n")))))) > + #~()) > + #$@(if (%current-target-system) > + #~((add-after 'unpack 'patch > + (lambda* (#:key native-inputs #:allow-other-keys) > + (invoke > + "patch" "-p1" "--force" "-i" > + #$(local-file > + (search-patch > + "elfutils-libdwfl-string-overflow.patch")= ))))) > + #~())))) >=20=20 > (native-inputs (list m4)) > (inputs (list xz zlib)) > diff --git a/gnu/packages/patches/elfutils-libdwfl-string-overflow.patch = b/gnu/packages/patches/elfutils-libdwfl-string-overflow.patch > new file mode 100644 > index 0000000000..e9d51359c4 > --- /dev/null > +++ b/gnu/packages/patches/elfutils-libdwfl-string-overflow.patch > @@ -0,0 +1,116 @@ > +from https://sourceware.org/cgit/elfutils/patch/?id=3D0873ae782d14e672e8= 344775e76b7fca0a8b41bf > + > +Adjust the changelog so it can be applied on elfutils 0.187. > + > +From 0873ae782d14e672e8344775e76b7fca0a8b41bf Mon Sep 17 00:00:00 2001 > +From: Mark Wielaard > +Date: Thu, 28 Jul 2022 15:31:12 +0200 > +Subject: libdwfl: Rewrite reading of ar_size in elf_begin_rand > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=3DUTF-8 > +Content-Transfer-Encoding: 8bit > + > +With GCC 12.1.1, glibc 2.35, -fsanitize=3Dundefined and > +-D_FORTIFY_SOURCE=3D3 we get the following error message: > + > +In file included from /usr/include/ar.h:22, > + from ../libelf/libelfP.h:33, > + from core-file.c:31: > +In function =E2=80=98pread=E2=80=99, > + inlined from =E2=80=98pread_retry=E2=80=99 at ../lib/system.h:188:21, > + inlined from =E2=80=98elf_begin_rand=E2=80=99 at core-file.c:86:16, > + inlined from =E2=80=98core_file_read_eagerly=E2=80=99 at core-file.c= :205:15: > +/usr/include/bits/unistd.h:74:10: error: =E2=80=98__pread_alias=E2=80=99= writing 58 or more bytes into a region of size 10 overflows the destinatio= n [-Werror=3Dstringop-overflow=3D] > + 74 | return __glibc_fortify (pread, __nbytes, sizeof (char), > + | ^~~~~~~~~~~~~~~ > +/usr/include/ar.h: In function =E2=80=98core_file_read_eagerly=E2=80=99: > +/usr/include/ar.h:41:10: note: destination object =E2=80=98ar_size=E2=80= =99 of size 10 > + 41 | char ar_size[10]; /* File size, in ASCII decimal. = */ > + | ^~~~~~~ > +/usr/include/bits/unistd.h:50:16: note: in a call to function =E2=80=98_= _pread_alias=E2=80=99 declared with attribute =E2=80=98access (write_only, = 2, 3)=E2=80=99 > + 50 | extern ssize_t __REDIRECT (__pread_alias, > + | ^~~~~~~~~~ > +cc1: all warnings being treated as errors > + > +The warning disappears when dropping either -fsanitize=3Dundefined > +or when using -D_FORTIFY_SOURCE=3D2. It looks like a false positive. > +But I haven't figured out how/why it happens. > + > +The code is a little tricky to proof correct though. The ar_size > +field is a not-zero terminated string ASCII decimal, right-padded > +with spaces. Which is then converted with strtoll. Relying on the > +fact that the struct ar_hdr is zero initialized, so there will be > +a zero byte after the ar_size field. > + > +Rewrite the code to just use a zero byte terminated char array. > +Which is much easier to reason about. As a bonus the error disappears. > + > +Signed-off-by: Mark Wielaard > +--- > + libdwfl/ChangeLog | 5 +++++ > + libdwfl/core-file.c | 26 ++++++++++++++++---------- > + 2 files changed, 21 insertions(+), 10 deletions(-) > + > +diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog > +index 75c53948d..acdaa0138 100644 > +--- a/libdwfl/ChangeLog > ++++ b/libdwfl/ChangeLog > +@@ -1,0 +1,5 @@ > ++2022-07-28 Mark Wielaard > ++ > ++ * core-file.c (elf_begin_rand): Replace struct ar_hdr h with > ++ a char ar_size[AR_SIZE_CHARS + 1] array to read size. > ++ > +2022-04-22 Mark Wielaard > + > + * debuginfod-client.c (init_control): New static pthread_once_t. > +diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c > +index cefc3db0f..4418ef338 100644 > +--- a/libdwfl/core-file.c > ++++ b/libdwfl/core-file.c > +@@ -75,26 +75,32 @@ elf_begin_rand (Elf *parent, off_t offset, off_t siz= e, off_t *next) > + from the archive header to override SIZE. */ > + if (parent->kind =3D=3D ELF_K_AR) > + { > +- struct ar_hdr h =3D { .ar_size =3D "" }; > +- > +- if (unlikely (parent->maximum_size - offset < sizeof h)) > ++ /* File size, in ASCII decimal, right-padded with ASCII spaces. > ++ Max 10 characters. Not zero terminated. So make this ar_size > ++ array one larger and explicitly zero terminate it. As needed > ++ for strtoll. */ > ++ #define AR_SIZE_CHARS 10 > ++ char ar_size[AR_SIZE_CHARS + 1]; > ++ ar_size[AR_SIZE_CHARS] =3D '\0'; > ++ > ++ if (unlikely (parent->maximum_size - offset < sizeof (struct ar_h= dr))) > + return fail (ELF_E_RANGE); > +=20 > + if (parent->map_address !=3D NULL) > +- memcpy (h.ar_size, parent->map_address + parent->start_offset + offset, > +- sizeof h.ar_size); > ++ memcpy (ar_size, parent->map_address + parent->start_offset + offset, > ++ AR_SIZE_CHARS); > + else if (unlikely (pread_retry (parent->fildes, > +- h.ar_size, sizeof (h.ar_size), > ++ ar_size, AR_SIZE_CHARS, > + parent->start_offset + offset > + + offsetof (struct ar_hdr, ar_size)) > +- !=3D sizeof (h.ar_size))) > ++ !=3D AR_SIZE_CHARS)) > + return fail (ELF_E_READ_ERROR); > +=20 > +- offset +=3D sizeof h; > ++ offset +=3D sizeof (struct ar_hdr); > +=20 > + char *endp; > +- size =3D strtoll (h.ar_size, &endp, 10); > +- if (unlikely (endp =3D=3D h.ar_size) > ++ size =3D strtoll (ar_size, &endp, 10); > ++ if (unlikely (endp =3D=3D ar_size) > + || unlikely ((off_t) parent->maximum_size - offset < size)) > + return fail (ELF_E_INVALID_ARCHIVE); > + } > +--=20 > +cgit=20 > + > > base-commit: 0787a180b3ca64d3958438920ca1b58a2a27fba4 pushed, closing. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmdplCYACgkQO1qpk+Gi 3/CptxAAn60SY4Xg5G48coOZVxawnxO6EpaEt/1HpGKzXtcsBVfZ3T7JloM/qxcw rRvO9vwEFbrXEu5SvAXdEr55vDsfPiWW4wIRNhDrD9N4XWAUbFoYyN8EwtXfQM7x J0Y8cGiwW4HDQ5gZbyRTn0AZ1WHkbXwF+mj+k1KuEvAV/BplQVOOcjAmLVRsCnsI RCFboKLDvjlzRYO30WHRIZBjUTmASkyj4d35U5AU54z9E+GNo82pnIPIdj5s/Q3v lwWJIO+nYgxG6VxakItS5lWma2bcTAe5vl2gXaf8wqJv9cFGSIF0biJxhO4HdMUm 5Z4l+aAvptB7jPHv4ctaEhGtkYhUKR/Xqt0RrwUI9jxu+XEFf/m1ra6TF5s/eEfz BJs4WyHabauriVhMJqMiLZaq3OmAKpjUP04tG4VwtbHwZBHfvrtXXVfYL6A8EK1s hZXRah8fYyUS+hMCB0CDSYdrQbbSNVRApSSV3UTwq1aeh4ZD2V6M/gOlaer8OvYQ GN935uC+ydLJ0yY1l9ahjEE13tfybym2PCN6O4mooB2pA5RoSGGNvIYNb0wWq6Je uLMZT0ClJ4C8d1ZiNTsTdQUWVjNW4HvSY9P9BleaQrBTLpiIcSVTLA1Bjc7lPIvS Ys0VtG2TOX9aooQPRghtq1opD8NxleoVtQnKKBvuTE3mA3bz1zA= =FOxi -----END PGP SIGNATURE----- --=-=-=--