Thread overview
[Issue 1423] New: Registry: corrupted value
Aug 16, 2007
d-bugmail
Aug 16, 2007
d-bugmail
Aug 29, 2007
d-bugmail
Sep 29, 2007
d-bugmail
August 16, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1423

           Summary: Registry: corrupted value
           Product: D
           Version: 1.018
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: keystuffs@netscape.net


Sometimes the value returned from the registry in corrupted.

Ex:
  writefln(Registry.classesRoot().getKey(".txt").getValue("").value_SZ());
  Display "☺   ile" instead of "txtfile".

  writefln(Registry.classesRoot().getKey(".rar").getValue("").value_SZ());
  Display "☺   AR" instead of "WinRAR".


But:
  writefln(Registry.classesRoot().getKey(".html").getValue("").value_SZ());
  Display "htmlfile".

I tried others keys and it seems that if the length of the value is less than 8, the value returned is corrupted.


-- 

August 16, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1423





------- Comment #1 from thecybershadow@gmail.com  2007-08-16 09:14 -------
Sounds like a duplicate of Bug 961.


-- 

August 29, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1423





------- Comment #2 from keystuffs@netscape.net  2007-08-29 08:37 -------
I was able to fix this bug:
in the function Reg_QueryValue_, I just added a .dup
    case REG_VALUE_TYPE.REG_EXPAND_SZ:
        value = std.string.toString(cast(char*)data);
        value = value.dup; // fix the bug.
        break;


-- 

September 29, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1423


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from bugzilla@digitalmars.com  2007-09-28 22:12 -------
Fixed dmd 1.021 and 2.004


--