This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Reading /proc/registry/... returns extra char
- From: Dale Stimson <cygwin-dale at riyescott dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 13 May 2010 11:12:49 -0700
- Subject: Reading /proc/registry/... returns extra char
Reading a file under /proc/registry returns an extra character at the end,
which appears to be the null character.
This has happened for every registry entry that I have tried. Here is
one in particular:
--------------------------------
$ cat >a.dat /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/SystemBootDevice
$ od -c a.dat
0000000 m u l t i ( 0 ) d i s k ( 0 ) r
0000020 d i s k ( 0 ) p a r t i t i o n
0000040 ( 2 ) \0
--------------------------------
or even
$ vim /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/SystemBootDevice
which shows its buffer (with "^@" representing the null character) as:
multi(0)disk(0)rdisk(0)partition(2)^@
This problem was first observed after I recently upgraded to cygwin 1.7.5-1.
The problem still occurs if /bin/cygwin1-20100507.dll is dropped in as /bin/cygwin1.dll.
Perhaps this problem was introduced by the recent fix which was noted by:
> From: Corinna Vinschen
> To: cygwin at cygwin dot com
> Date: Wed, 5 May 2010 11:38:49 +0200
> Subject: Re: reading /proc/registry/ causes Segmentation fault.
> ...
> There was a buffer overflow in wide character string allocation which
> broke /proc/registry access. It has been fixed one day after releasing
> Cygwin 1.7.5.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple