delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/05/13/14:13:02

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=2.0 required=5.0 tests=AWL,BAYES_00,TVD_RCVD_IP
X-Spam-Check-By: sourceware.org
Date: Thu, 13 May 2010 11:12:49 -0700
From: Dale Stimson <cygwin-dale AT riyescott DOT com>
To: cygwin AT cygwin DOT com
Subject: Reading /proc/registry/... returns extra char
Message-ID: <20100513181249.GE13784@cupro.opengvs.com>
MIME-Version: 1.0
User-Agent: Mutt/1.5.19 (2009-01-05)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019