View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024088 | Open CASCADE | OCCT:DRAW | public | 2013-07-25 12:54 | 2014-05-05 13:37 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2008 | ||
Product Version | 6.3.1 | ||||
Target Version | 6.7.1 | Fixed in Version | 6.7.1 | ||
Summary | 0024088: Unsafe window handle management in Draw using GetWindowLong | ||||
Description | Draw/MainWindow.cxx contains code which uses GetWindowLong/SetWindowLong functions to store window handle. This is invalid on x86_64 systems and may cause crash if handle value exceed 32-bit boundary. Also CLIENTWND is set to 0 which looks suspicions (DWL_MSGRESULT is not for custom use according to MSDN). | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Dear kgv, Please, review the changes made in branch CR24088. |
|
Dear omy, please proceed the same issues within other files in Draw package. (like this one:) #ifndef _WIN64 hInstance = (HANDLE)GetWindowLong(hWndFrame, GWL_HINSTANCE); #else hInstance = (HANDLE)GetWindowLong(hWndFrame, GWLP_HINSTANCE); #endif |
|
Dear kgv, I've made the necessary corrections. Please, review the branch CR24088_1 |
|
Dear omy,- DWORD aWinStyle = GetWindowLong (win, GWL_STYLE); - DWORD aWinStyleEx = GetWindowLong (win, GWL_EXSTYLE); + DWORD aWinStyle = GetWindowLongPtr (win, GWL_STYLE); + DWORD aWinStyleEx = GetWindowLongPtr (win, GWL_EXSTYLE); these changes are unrelated to bug. Other part of the patch looks OK. |
|
Dear kgv, I've reverted the mentioned changes. Please, review. |
|
Dear Bugmaster, patch in branch CR24088_1 is ready for testing. |
|
Dear BugMaster, Branch CR24088_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: a5d18d0ce61475b82bea512527f028fae176585e Number of compiler warnings: occt component : Linux: 54 (55 on master) Windows: 1 (1 on master) products component : Linux: 20 (20 on master) Windows: 2 (2 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 358021636 / 357072716 Total CPU difference: 44356.07000000028 / 42990.47999999986 Testing on Windows: Total MEMORY difference: 414002516 / 412488216 Total CPU difference: 34128.8125 / 32601.78125 There are not differences in images found by testdiff. |
occt: master e89e2d67 2014-01-16 08:16:56
Committer: bugmaster Details Diff |
0024088: Unsafe window handle management in Draw using GetWindowLong Replaced Get-/SetWindowLong with Get-/SetWindowLongPtr in files of TKDraw. Reverted the unrelated changes |
Affected Issues 0024088 |
|
mod - src/Draw/CommandWindow.cxx | Diff File | ||
mod - src/Draw/Draw_Window.cxx | Diff File | ||
mod - src/Draw/init.cxx | Diff File | ||
mod - src/Draw/MainWindow.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-07-25 12:54 | kgv | New Issue | |
2013-07-25 12:54 | kgv | Assigned To | => mkv |
2013-07-25 12:55 | kgv | Relationship added | related to 0023904 |
2013-07-25 12:55 | kgv | Target Version | => 6.7.0 |
2013-07-29 15:47 |
|
Assigned To | mkv => kgv |
2013-07-29 15:47 |
|
Status | new => assigned |
2013-10-18 07:38 | kgv | Product Version | => 6.3.1 |
2013-10-18 07:38 | kgv | Target Version | 6.7.0 => 6.7.1 |
2014-01-08 14:55 | kgv | Assigned To | kgv => omy |
2014-01-09 12:25 |
|
Note Added: 0027417 | |
2014-01-09 12:25 |
|
Assigned To | omy => kgv |
2014-01-09 12:25 |
|
Status | assigned => resolved |
2014-01-09 16:15 | kgv | Note Added: 0027420 | |
2014-01-09 16:15 | kgv | Assigned To | kgv => omy |
2014-01-09 16:15 | kgv | Status | resolved => assigned |
2014-01-10 10:45 |
|
Note Added: 0027430 | |
2014-01-10 10:45 |
|
Assigned To | omy => kgv |
2014-01-10 10:45 |
|
Status | assigned => resolved |
2014-01-10 12:29 | kgv | Note Added: 0027432 | |
2014-01-10 12:29 | kgv | Assigned To | kgv => omy |
2014-01-10 12:29 | kgv | Status | resolved => assigned |
2014-01-10 12:56 |
|
Note Added: 0027433 | |
2014-01-10 12:56 |
|
Assigned To | omy => kgv |
2014-01-10 12:56 |
|
Status | assigned => resolved |
2014-01-10 13:53 | kgv | Note Added: 0027434 | |
2014-01-10 13:53 | kgv | Assigned To | kgv => bugmaster |
2014-01-10 13:53 | kgv | Status | resolved => reviewed |
2014-01-10 14:09 |
|
Assigned To | bugmaster => mkv |
2014-01-13 14:08 |
|
Note Added: 0027451 | |
2014-01-13 14:09 |
|
Test case number | => Not needed |
2014-01-13 14:09 |
|
Assigned To | mkv => bugmaster |
2014-01-13 14:09 |
|
Status | reviewed => tested |
2014-01-21 11:22 | bugmaster | Changeset attached | => occt master e89e2d67 |
2014-01-21 11:22 | bugmaster | Status | tested => verified |
2014-01-21 11:22 | bugmaster | Resolution | open => fixed |
2014-05-05 13:34 |
|
Status | verified => closed |
2014-05-05 13:37 |
|
Fixed in Version | => 6.7.1 |