diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c index e1b1dcfc..2df94f05 100644 --- a/src/x86/Ginit.c +++ b/src/x86/Ginit.c @@ -117,6 +117,9 @@ validate_mem (unw_word_t addr) addr = PAGE_START(addr); + if (addr == 0) + return -1; + for (i = 0; i < NLGA; i++) { if (last_good_addr[i] && (addr == last_good_addr[i])) diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c index 031deaa2..51d77c27 100644 --- a/src/x86_64/Ginit.c +++ b/src/x86_64/Ginit.c @@ -120,6 +120,9 @@ validate_mem (unw_word_t addr) addr = PAGE_START(addr); + if (addr == 0) + return -1; + for (i = 0; i < NLGA; i++) { if (last_good_addr[i] && (addr == last_good_addr[i]))