View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002854 | JEDI VCL | 00 JVCL Components | public | 2005-04-09 17:46 | 2005-04-10 16:07 |
Reporter | timschat | Assigned To | outchy | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0002854: Reading and Writing binary data from registry using TJvAppRegistryStorage causes AV | ||||
Description | The issue is caused by a misunderstanding of pointer passing. The corrected code looks as follows: function TJvAppRegistryStorage.DoReadBinary(const Path: string; Buf: Pointer; BufSize: Integer): Integer; var SubKey: string; ValueName: string; begin SplitKeyPath(Path, SubKey, ValueName); Result := RegReadBinary(FRegHKEY, SubKey, ValueName, Buf^, BufSize); end; procedure TJvAppRegistryStorage.DoWriteBinary(const Path: string; Buf: Pointer; BufSize: Integer); var SubKey: string; ValueName: string; begin SplitKeyPath(Path, SubKey, ValueName); CreateKey(SubKey); RegWriteBinary(FRegHKEY, SubKey, ValueName, Buf^, BufSize); end; | ||||
Tags | No tags attached. | ||||
|
This bug was introduced when the function's prototypes were changed. |
|
This bug caused no AV on my machine (addresses were still valid), but it was address to address which cause erratic behaviour (the code was writting the low order byte of the address, not the content pointed). I didn't have any AV running my tests because the data size was below 4 bytes, there may be AV if the data size was above or equal 4 bytes. Bug fixed in the CVS. |
|
Jep, actually I think everything >4 bytes messes up the stack. But good to hear its fixed :) |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-04-09 17:46 | timschat | New Issue | |
2005-04-10 13:13 | outchy | Note Added: 0006881 | |
2005-04-10 13:13 | outchy | Status | new => confirmed |
2005-04-10 13:33 | outchy | Note Added: 0006883 | |
2005-04-10 13:59 | anonymous | Note Added: 0006884 | |
2005-04-10 16:07 | outchy | Status | confirmed => resolved |
2005-04-10 16:07 | outchy | Resolution | open => fixed |
2005-04-10 16:07 | outchy | Assigned To | => outchy |