registry.rb: fix buffer overflow

* ext/win32/lib/win32/registry.rb (Win32::Registry::Error#initialize):
  should not re-use sliced string as buffer, to get rid of buffer
  overflow.  [ruby-core:65295] [Bug #10300]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e