COMCTL32 Subclassing

Filip Navara xnavara at volny.cz
Fri Apr 16 18:43:52 CDT 2004


Hi,

I have found a bug in Wine's comctl32.dll that causes crashes with 
subclassed windows. There can happen a situation when DefSubclassProc 
ends with all subclassings removed, in this case it cleans up the 
subclassing stack stored in a window property and frees it's memory. If 
DefSubclassProc was called from SubclassWndProc, there will happen crash 
because the subclassing stack is no longer valid. Anyone has a solution 
for this?

- Filip

--- lib/comctl32/commctrl.c    15 Apr 2004 08:29:56 -0000    1.9
+++ lib/comctl32/commctrl.c    16 Apr 2004 23:32:26 -0000
@@ -1284,9 +1284,7 @@
    }
    stackpos = stack->stackpos;
    stack->stackpos = stack->stacknum;
-   ret = DefSubclassProc(hWnd,uMsg,wParam,lParam);
-   stack->stackpos = stackpos;
-   return ret;
+   return DefSubclassProc(hWnd,uMsg,wParam,lParam);
 }




More information about the wine-devel mailing list