Bug: regtool does not fully display REG_MULTI_SZ values that contain a zero-length component

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug: regtool does not fully display REG_MULTI_SZ values that contain a zero-length component

Max Bowsher
When printing out a a REG_MULTI_SZ, regtool stops printing at the first \0\0
sequence encountered. However, if the multi-string contains a zero-length
element, a \0\0 sequence will be encountered before the end of the data.

regtool should use the length value returned from the registry query call to
know when it has printed all data, not the presence of a \0\0 sequence.

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: Bug: regtool does not fully display REG_MULTI_SZ values that contain a zero-length component

Corinna Vinschen-2
On Nov  3 21:55, Max Bowsher wrote:
> When printing out a a REG_MULTI_SZ, regtool stops printing at the first
> \0\0 sequence encountered. However, if the multi-string contains a
> zero-length element, a \0\0 sequence will be encountered before the end of
> the data.
>
> regtool should use the length value returned from the registry query call
> to know when it has printed all data, not the presence of a \0\0 sequence.

I was going to point you to the drill, http://cygwin.com/acronyms/#PTC,
but I read the description of REG_MULTI_SZ keys again.  It's definitely
defined as a list of null-terminated strings, with an empty string (aka,
one single \0) terminating the list.  Applications requesting a
REG_MULTI_SZ value will not expect an empty string in the middle since
that's against the definition.  If you try to add such a REG_MULTI_SZ
value using RedEdit, you'll get an error message "Data of type
REG_MULTI_SZ cannot contain empty strings. Registry Editor will remove
the empty string found."  What's the deal to change regtool to support
that?


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/