Project

General

Profile

Bug #17794 ยป ruby-addr2line-free-invalid-pointer.patch

xtkoba (Tee KOBAYASHI), 04/12/2021 04:20 AM

View differences:

addr2line.c
1699 1699
static unsigned long
1700 1700
uncompress_debug_section(ElfW(Shdr) *shdr, char *file, char **ptr)
1701 1701
{
1702
    *ptr = NULL;
1702 1703
#ifdef SUPPORT_COMPRESSED_DEBUG_LINE
1703 1704
    ElfW(Chdr) *chdr = (ElfW(Chdr) *)(file + shdr->sh_offset);
1704 1705
    unsigned long destsize = chdr->ch_size;
......
1719 1720

  
1720 1721
fail:
1721 1722
    free(*ptr);
1723
    *ptr = NULL;
1722 1724
#endif
1723 1725
    return 0;
1724 1726
}