bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/24225] nios2 overflows stack with error message: *** buffer over


From: slyfox at inbox dot ru
Subject: [Bug ld/24225] nios2 overflows stack with error message: *** buffer overflow detected ***: /usr/libexec/gcc/nios2-unknown-linux-gnu/ld terminated
Date: Sat, 16 Feb 2019 23:00:33 +0000

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

--- Comment #1 from Sergei Trofimovich <slyfox at inbox dot ru> ---
I think the problem here happens at bfd/elf32-nios2.c:3846:

    static bfd_boolean nios2_elf32_relocate_section (bfd *output_bfd, ...) {
    ...
    char msgbuf[256];
    ...
    /* xgettext:c-format */
    format = _("unable to reach %s (at 0x%08x) from the "
               "global pointer (at 0x%08x) because the "
               "offset (%d) is out of the allowed range, "
               "-32678 to 32767\n" );
    sprintf (msgbuf, format, name, symbol_address, gp,
             (signed)relocation);

snprintf() does out-of-bound write due to relatively long symbol name and big
blowup of format string in 'ru' locale.

-- 
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]