mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-21 18:50:50 +01:00
Fix memory corruption in C++ demangler
The __cxa_demangle_gnu3() and cpp_demangle_gnu3() functions segfault on various libcxxabi test cases due to a copy and paste error. This change fixes that. This is a subset of https://github.com/libcxxrt/libcxxrt/pull/34 which fixes the immediate problem. Reviewed by: imp, emaste (I think) Pull Request: https://github.com/freebsd/freebsd-src/pull/1222
This commit is contained in:
parent
fbe965591f
commit
12be6f12e8
@ -2138,7 +2138,7 @@ cpp_demangle_read_sname(struct cpp_demangle_data *ddata)
|
||||
assert(ddata->cur_output->size > 0);
|
||||
if (vector_read_cmd_find(&ddata->cmd, READ_TMPL) == NULL)
|
||||
ddata->last_sname =
|
||||
ddata->cur_output->container[ddata->output.size - 1];
|
||||
ddata->cur_output->container[ddata->cur_output->size - 1];
|
||||
|
||||
ddata->cur += len;
|
||||
|
||||
|
@ -2472,7 +2472,7 @@ cpp_demangle_read_sname(struct cpp_demangle_data *ddata)
|
||||
assert(ddata->cur_output->size > 0);
|
||||
if (vector_read_cmd_find(&ddata->cmd, READ_TMPL) == NULL)
|
||||
ddata->last_sname =
|
||||
ddata->cur_output->container[ddata->output.size - 1];
|
||||
ddata->cur_output->container[ddata->cur_output->size - 1];
|
||||
|
||||
ddata->cur += len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user