libbacktrace: correct memory lengths in Mach-O dsym support
* macho.c (macho_add_dsym): Make space for '/' in dsym. Use correct length when freeing diralc.
This commit is contained in:
parent
8183ebcdc1
commit
a8a7a97b4e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user