summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-10-01 10:56:11 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-10-01 10:56:11 +0000
commit529100b8d715f07e8f2520460eaca044bc0b5317 (patch)
tree03194b6410a6b2b9188bc2ac252a5904f626ab95 /dir.c
parent78ef2d0f331c3e056ee367214710b41722de2fe0 (diff)
downloadruby-529100b8d715f07e8f2520460eaca044bc0b5317.tar.gz
merge revision(s) a0a2640b398cffd351f87d3f6243103add66575b:
Fix for wrong fnmatch patttern * dir.c (file_s_fnmatch): ensure that pattern does not contain a NUL character. https://hackerone.com/reports/449617 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 69b53cb0e6..38167514c0 100644
--- a/dir.c
+++ b/dir.c
@@ -3230,7 +3230,7 @@ file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
else
flags = 0;
- StringValue(pattern);
+ StringValueCStr(pattern);
FilePathStringValue(path);
if (flags & FNM_EXTGLOB) {