ruby-changes:67922
From: nagachika <ko1@a...>
Date: Sat, 11 Sep 2021 14:18:44 +0900 (JST)
Subject: [ruby-changes:67922] 8e4ed4ed00 (ruby_3_0): merge revision(s) d795f494a89e0d9498dfedc54b8a98acc2bc4d7b: [Backport #17794]
https://git.ruby-lang.org/ruby.git/commit/?id=8e4ed4ed00 From 8e4ed4ed00e8346029953c14dd414a996e37a437 Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@r...> Date: Sat, 11 Sep 2021 13:52:43 +0900 Subject: merge revision(s) d795f494a89e0d9498dfedc54b8a98acc2bc4d7b: [Backport #17794] Avoid `free(3)`ing invalid pointer Fixes [Bug #17794] --- addr2line.c | 2 ++ 1 file changed, 2 insertions(+) --- addr2line.c | 2 ++ version.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addr2line.c b/addr2line.c index 2095591..0029cff 100644 --- a/addr2line.c +++ b/addr2line.c @@ -1626,6 +1626,7 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces, https://github.com/ruby/ruby/blob/trunk/addr2line.c#L1626 static unsigned long uncompress_debug_section(ElfW(Shdr) *shdr, char *file, char **ptr) { + *ptr = NULL; #ifdef SUPPORT_COMPRESSED_DEBUG_LINE ElfW(Chdr) *chdr = (ElfW(Chdr) *)(file + shdr->sh_offset); unsigned long destsize = chdr->ch_size; @@ -1646,6 +1647,7 @@ uncompress_debug_section(ElfW(Shdr) *shdr, char *file, char **ptr) https://github.com/ruby/ruby/blob/trunk/addr2line.c#L1647 fail: free(*ptr); + *ptr = NULL; #endif return 0; } diff --git a/version.h b/version.h index b314a89..687a8ef 100644 --- a/version.h +++ b/version.h @@ -12,11 +12,11 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L12 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 3 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 130 +#define RUBY_PATCHLEVEL 131 #define RUBY_RELEASE_YEAR 2021 #define RUBY_RELEASE_MONTH 9 -#define RUBY_RELEASE_DAY 5 +#define RUBY_RELEASE_DAY 11 #include "ruby/version.h" -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/