[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH hivex] regedit: Add implicit nul-termination when importing strings.



On 28/04/10 14:32, Richard W.M. Jones wrote:
>>From 81cc08b749bde37f364400c2b983d1e73e8dde21 Mon Sep 17 00:00:00 2001
> From: Richard Jones <rjones redhat com>
> Date: Wed, 28 Apr 2010 14:28:27 +0100
> Subject: [PATCH] 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 |    3 +++
>  perl/t/560-regedit-import.t   |    6 +++---
>  2 files changed, 6 insertions(+), 3 deletions(-)

Tested this against both win2k3 and win2k8. Worked fine.

ACK.

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]