bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29860] [2.40 Regression] Can't convert from 64-bit ELF to


From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/29860] [2.40 Regression] Can't convert from 64-bit ELF to 32-bit ELF with 32-bit objcopy
Date: Tue, 06 Dec 2022 22:48:31 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29860

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e25466730d436937e814f80b69e5d124513fff03

commit e25466730d436937e814f80b69e5d124513fff03
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Dec 6 12:54:43 2022 -0800

    bfd: Avoid signed overflow for new_size adjustment

    When bfd_size_type is unsigned 64-bit integer and sizeof is unsigned
    32-bit integer, subtraction in

    *new_size += sizeof (Elf32_External_Chdr) - sizeof (Elf64_External_Chdr);

    will overflow.  Use

    *new_size -= sizeof (Elf64_External_Chdr) - sizeof (Elf32_External_Chdr);

    to avoid overflow.

            PR binutils/29860
            * compress.c (bfd_convert_section_setup): Avoid signed overflow
            for new_size adjustment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]