Closed Bug 1129712 Opened 9 years ago Closed 9 years ago

nsWindowsRegKey::readStringValue returns value plus trailing garbage

Categories

(Core :: XPCOM, defect)

All
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: darktrojan, Unassigned)

Details

If I run this code:

> var wrk = (Components
>            .classes["@mozilla.org/windows-registry-key;1"]
>            .createInstance(Components.interfaces.nsIWindowsRegKey));
> wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE,
>          "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
>          wrk.ACCESS_READ);
> var currentTZStandardName = wrk.readStringValue("TimeZoneKeyName");
> wrk.close()

currentTZStandardName is a 128-char string with the value, \0, and some trailing garbage. I suspect it might be something to do with bug 936886.
This is a bug in Windows, apparently: https://stackoverflow.com/a/27736310

Thanks to :Kwan for figuring this out.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.