tlibmach: fix crash in dwarfpc (misuse of realloc) - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 0dc3aa4b1dcca64ca747de9ceb05f0033f884bd6
 (DIR) parent dad9d0ac8faf5482c0305a1da7356b1b1982c0a0
 (HTM) Author: Xi Wang <xi.wang@gmail.com>
       Date:   Wed, 30 Jan 2013 17:46:12 -0800
       
       libmach: fix crash in dwarfpc (misuse of realloc)
       
       R=rsc
       CC=plan9port.codebot
       https://codereview.appspot.com/7225059
       
       Diffstat:
         M src/libmach/dwarfpc.c               |       1 +
       
       1 file changed, 1 insertion(+), 0 deletions(-)
       ---
 (DIR) diff --git a/src/libmach/dwarfpc.c b/src/libmach/dwarfpc.c
       t@@ -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);