Re: [PATCH][libbacktrace] Fix segfault upon allocation failure

2018-11-28 Thread Ian Lance Taylor
Tom de Vries writes: > 2018-11-27 Tom de Vries > > * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation > failure. This is OK. Thanks. Ian

[PATCH][libbacktrace] Fix segfault upon allocation failure

2018-11-28 Thread Tom de Vries
Hi, If the allocation of abbrevs->abbrevs in read_abbrevs fails, then abbrevs->num_abbrevs remains nonzero, and consequently free_abbrevs will segfault when accessing abbrevs->abbrevs. Fix this by setting abbrevs->num_abbrevs only after abbrevs->abbrevs allocation has succeeded. Bootstrapped and