libmach: fix crash in dwarfpc (misuse of realloc)
R=rsc CC=plan9port.codebot https://codereview.appspot.com/7225059
This commit is contained in:
parent
dad9d0ac8f
commit
0dc3aa4b1d
1 changed files with 1 additions and 0 deletions
|
|
@ -194,6 +194,7 @@ dwarfpctoline(Dwarf *d, ulong pc, char **cdir, char **dir, char **file, ulong *l
|
|||
newf = realloc(f, (nf+1)*sizeof(f[0]));
|
||||
if(newf == nil)
|
||||
goto out;
|
||||
f = newf;
|
||||
f[nf++] = b.p;
|
||||
s = dwarfgetstring(&b);
|
||||
dwarfget128(&b);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue