[ros-bugs] [Bug 2414] importing of hivesys.inf fails

ReactOS.Bugzilla at www.reactos.org ReactOS.Bugzilla at www.reactos.org
Mon Jul 23 09:51:15 CEST 2007


http://www.reactos.org/bugzilla/show_bug.cgi?id=2414





------- Comment #12 from hpoussin at reactos.org  2007-07-23 09:51 CET -------
In lib/inflib/infget.c:InfpGetMultiSzField, see lines 346 to 354.
The size is calculated, including the NULL terminator (so no need to add any
other char)
In base/setup/usetup/registry.c:273, you're allocating Size * sizeof(WCHAR)
bytes.

Your buffer is (Size * sizeof(WCHAR)) bytes and already contains the final
UNICODE_NULL char. So, line 336 is correct. Adding "+ 1" (as you suggested)
would store in the registry more than the allocated buffer and the last byte
would not be initialized.
So, I think that your "fix" is in reality a hack.


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
You are the assignee for the bug, or are watching the assignee.


More information about the Ros-bugs mailing list