diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-28 09:26:01 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-28 09:26:01 +0000 |
commit | 93081375feeebace137266f36f4c2c43aa2223e1 (patch) | |
tree | 1515e6e537eaa882e7e44a61af18d66506b64a99 /ext | |
parent | 1d41853556eeec7bdfecb25bd23ed921f7355e7e (diff) |
unixsocket.c: check NUL bytes
* ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes.
https://hackerone.com/reports/302997
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@62973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/unixsocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c index 5a44b552f8..bf373f20ec 100644 --- a/ext/socket/unixsocket.c +++ b/ext/socket/unixsocket.c @@ -33,7 +33,7 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server) int fd, status; rb_io_t *fptr; - SafeStringValue(path); + FilePathValue(path); INIT_SOCKADDR_UN(&sockaddr, sizeof(struct sockaddr_un)); if (sizeof(sockaddr.sun_path) < (size_t)RSTRING_LEN(path)) { |