mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fix memory corruption in NSException.
If compiling without backtrace or BFD support, we initialise the location to store return addresses incorrectly, leaving a dangling pointer which we then right over. Most consumers never read this, so it seemed to work most of the time by just overwriting a random bit of memory. This probably has security implications, because throwing an exception can clobber random bits of memory, though not with attacker-controlled data.
This commit is contained in:
parent
0ebb50f984
commit
3b1e94ec5d
3 changed files with 145 additions and 2 deletions
|
@ -966,7 +966,7 @@ GSPrivateReturnAddresses(NSUInteger **returns)
|
|||
{
|
||||
jbuf_type *env;
|
||||
|
||||
returns = malloc(numReturns * sizeof(void*));
|
||||
*returns = malloc(numReturns * sizeof(void*));
|
||||
|
||||
env = jbuf();
|
||||
if (sigsetjmp(env->buf, 1) == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue