projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8183ebc
)
libbacktrace: correct memory lengths in Mach-O dsym support
author
Ian Lance Taylor
<iant@golang.org>
Tue, 8 Sep 2020 21:50:32 +0000
(14:50 -0700)
committer
Ian Lance Taylor
<iant@golang.org>
Tue, 8 Sep 2020 21:51:32 +0000
(14:51 -0700)
* macho.c (macho_add_dsym): Make space for '/' in dsym. Use
correct length when freeing diralc.
libbacktrace/macho.c
patch
|
blob
|
history
diff --git
a/libbacktrace/macho.c
b/libbacktrace/macho.c
index 20dd3262d58bfd98076c62e5dfba7459acde817d..241d54b5e5e081bb61d029f7f2df5a7b52300569 100644
(file)
--- a/
libbacktrace/macho.c
+++ b/
libbacktrace/macho.c
@@
-903,6
+903,7
@@
macho_add_dsym (struct backtrace_state *state, const char *filename,
dsymsuffixdirlen = strlen (dsymsuffixdir);
dsymlen = (dirnamelen
+ + 1
+ basenamelen
+ dsymsuffixdirlen
+ basenamelen
@@
-925,7
+926,7
@@
macho_add_dsym (struct backtrace_state *state, const char *filename,
if (diralc != NULL)
{
- backtrace_free (state, diralc, dirnamelen, error_callback, data);
+ backtrace_free (state, diralc, dirnamelen
+ 1
, error_callback, data);
diralc = NULL;
}