|
#1
|
|||
|
|||
|
Bug: Integer overflow in Registry GetValue/SetValue
Hi
I've some lua code that I use to copy registry keys in my installer. I'm finding it's converting any REG_DWORD value of 0xFFFFFFFE to 0x7FFFFFF everything else copies fine, just these large DWORDs. My guess is it's converting any value > max signed int to max signed int. Either that or the set value is incorrectly dealing with sign. The copy function is as below Code:
function CopyRegKey(rootkey, source, dest, bDeleteOld) -- create target key Registry.CreateKey(rootkey, dest); -- recursively iterate subkeys subkeys = Registry.GetKeyNames(rootkey, source); if(subkeys ~= nil) then for ind, keyname in pairs(subkeys) do CopyRegKey(rootkey, source.."\\"..keyname, dest.."\\"..keyname, bDeleteOld); end end -- copy the values over values = Registry.GetValueNames(rootkey, source); if(values ~= nil) then for ind, valname in pairs(values) do -- get data and type from source value v = Registry.GetValue(rootkey, source, valname, false); t = Registry.GetValueType(rootkey, source, valname); -- poke the value into the target key Registry.SetValue(rootkey, dest, valname, v, t); end end -- ok, no subkeys or values in this source key, delete it if(bDeleteOld== true)then Registry.DeleteValue(rootkey, source, "(Default)"); Registry.DeleteKey(rootkey, source); end end Last edited by adrien; 03-24-2009 at 10:10 PM. |
|
#2
|
||||
|
||||
|
Hello,
thank you for the report. This has been entered into our internal bug tracking database. Reference number: 18425. Regards, Ulrich |
|
#3
|
|||
|
|||
|
thanks
I had to fix the problem quick, so I wrote an action module for it which I just submitted. those functions really should be part of Registry. I can give you source if you like. Regards Adrien |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BUG; Registry delete value | Solmos | AutoPlay Media Studio 7.5 Suggestions | 5 | 03-25-2008 08:58 PM |
| TrueUpdate 2.0 Update (v2.0.6.0) Released | Brett | TrueUpdate 2.0 | 0 | 10-31-2006 02:10 PM |
| New Setup Factory 7.0 (v 7.0.2.0) Available | Darryl | Setup Factory 7.0 Discussion | 9 | 03-06-2005 02:57 PM |
| AutoPlay Media Studio 4.0.0.3 Released | Brett | AutoPlay Media Studio 4.0 | 0 | 12-11-2002 09:39 AM |
All times are GMT -6. The time now is 04:28 PM.








Linear Mode

