]> granicus.if.org Git - strace/blobdiff - unwind.c
Fix the length argument passed from print_iovec to decode_netlink
[strace] / unwind.c
index 238e215d0003c96138d3553ee41016818ee4bea7..6a7f342cc97a27f0dfb051089845318e2d731a32 100644 (file)
--- a/unwind.c
+++ b/unwind.c
@@ -103,6 +103,9 @@ unwind_init(void)
 void
 unwind_tcb_init(struct tcb *tcp)
 {
+       if (tcp->libunwind_ui)
+               return;
+
        tcp->libunwind_ui = _UPT_create(tcp->pid);
        if (!tcp->libunwind_ui)
                die_out_of_memory();
@@ -156,7 +159,7 @@ build_mmap_cache(struct tcb* tcp)
                struct mmap_cache_t *entry;
                unsigned long start_addr, end_addr, mmap_offset;
                char exec_bit;
-               char binary_path[PATH_MAX];
+               char binary_path[sizeof(buffer)];
 
                if (sscanf(buffer, "%lx-%lx %*c%*c%c%*c %lx %*x:%*x %*d %[^\n]",
                           &start_addr, &end_addr, &exec_bit,