regedit: Add implicit nul-termination when importing strings.
authorRichard Jones <rjones@redhat.com>
Wed, 28 Apr 2010 13:28:27 +0000 (14:28 +0100)
committerRichard Jones <rjones@redhat.com>
Wed, 28 Apr 2010 13:28:27 +0000 (14:28 +0100)
commit81cc08b749bde37f364400c2b983d1e73e8dde21
tree1a555b5d53c1a9d60aba95a5f9a6bd11653a254f
parent19ac2618ddfecb0ce6d98c3cbb2bfa2c3c11135c
regedit: Add implicit nul-termination when importing strings.

When you import a string value like:
  "Foo"="Bar"
using Windows regedit program, implicit nul-termination is added
to the value (not the key), so what is stored in the value would
be something like:
  hex(1):42,00,61,00,72,00,00,00
where two of the trailing zero bytes come from the implicit
terminator.  This corrects the reg_import function so it works
the same way.
perl/lib/Win/Hivex/Regedit.pm
perl/t/560-regedit-import.t