From 529100b8d715f07e8f2520460eaca044bc0b5317 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 1 Oct 2019 10:56:11 +0000 Subject: 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 --- dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dir.c') 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) { -- cgit v1.2.1