diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 14:14:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 14:14:07 +0000 |
commit | 42edb7ec8ab158f0ced9c99e7a34588ecdfa41cd (patch) | |
tree | 7e4a89a484db3822d8c21967bac22a2e65567722 /thread.c | |
parent | d20b333c326fefeec8de885e2381c1108a9fb3b0 (diff) | |
download | ruby-42edb7ec8ab158f0ced9c99e7a34588ecdfa41cd.tar.gz |
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
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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__) |