summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 06:16:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 06:16:03 +0000
commit0c551b7a6de46e54e4c273c4b7959aae362d5aa2 (patch)
treebb3b61e5960e01df8b5793e48cda6cd47c21c253 /process.c
parent72c96011ea9251e1f2bf9e4fc1edfd1a9e9f1a56 (diff)
downloadruby-0c551b7a6de46e54e4c273c4b7959aae362d5aa2.tar.gz
process.c: null byte at initgroups
* process.c (proc_initgroups): check null byte. patched by tommy (Masahiro Tomita) in [ruby-dev:50287]. [Bug #13995] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/process.c b/process.c
index 2d842176bd..97ba885fca 100644
--- a/process.c
+++ b/process.c
@@ -5948,7 +5948,7 @@ proc_setgroups(VALUE obj, VALUE ary)
static VALUE
proc_initgroups(VALUE obj, VALUE uname, VALUE base_grp)
{
- if (initgroups(StringValuePtr(uname), OBJ2GID(base_grp)) != 0) {
+ if (initgroups(StringValueCStr(uname), OBJ2GID(base_grp)) != 0) {
rb_sys_fail(0);
}
return proc_getgroups(obj);