From c56d9aaabf8f4886e1ba69d24024727ab905aed4 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 1 Dec 2015 14:14:07 +0000 Subject: thread.c: check name argument * thread.c (rb_thread_setname): check the argument if valid string. [ruby-core:71774] [Bug #11756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 1 + 1 file changed, 1 insertion(+) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 7190a943bd..62713e80aa 100644 --- a/thread.c +++ b/thread.c @@ -2776,6 +2776,7 @@ rb_thread_setname(VALUE thread, VALUE name) { rb_thread_t *th; GetThreadPtr(thread, th); + StringValueCStr(name); th->name = rb_str_new_frozen(name); #if defined(HAVE_PTHREAD_SETNAME_NP) # if defined(__linux__) -- cgit v1.2.3