public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] asan: pef: buffer overflow
@ 2022-11-28  9:46 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-11-28  9:46 UTC (permalink / raw)
  To: bfd-cvs

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

commit 970a38be462bda875ac495c51e93af728a8c98de
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Nov 28 10:16:41 2022 +1030

    asan: pef: buffer overflow
    
            * pef.c (bfd_pef_parse_traceback_table): Correct size moved when
            stripping leading dot.

Diff:
---
 bfd/pef.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/pef.c b/bfd/pef.c
index 334d802eb75..e8672a40da7 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -181,7 +181,7 @@ bfd_pef_parse_traceback_table (bfd *abfd,
 
       /* Strip leading period inserted by compiler.  */
       if (namebuf[0] == '.')
-	memmove (namebuf, namebuf + 1, name.name_len + 1);
+	memmove (namebuf, namebuf + 1, name.name_len);
 
       sym->name = namebuf;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-28  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28  9:46 [binutils-gdb] asan: pef: buffer overflow Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).