Extra info in scrollbar can be an handle.

Marco Bizzarri m.bizzarri at icube.it
Tue Nov 6 06:51:51 CST 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi all.

We have an application which crashes when trying to access the Window Long
info in a scrollbar.

After some tracking, it looked like the issue was that in some cases the
wExtra data can contain an handle rather than a pointer.

The included patch solves the problem by making an explicit GlobalLock,
and returning that value. I'm not sure this is the correct solution, so
comments are welcome.

wine is from the latest cvs

- -- 
Marco Bizzarri - Responsabile Tecnico - Icube S.r.l.
Sede:   Via Ridolfi 15 - 56124 Pisa (PI), Italia 
E-mail: m.bizzarri at icube.it		WWW: www.icube.it	
Tel: 	(+39) 050 97 02 07		Fax: (+39) 050 31 36 588	
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE759zoXhfyAQQVoaIRApoGAJwOhVqzWtvYCz1oHZTcYSCYeCDQ6wCePBE3
DJ/zoeclED29BCnaC+9Ya8E=
=rU+H
-----END PGP SIGNATURE-----
-------------- next part --------------
--- scroll.c	Tue Nov  6 13:24:30 2001
+++ scroll.c.old	Tue Nov  6 13:22:54 2001
@@ -157,13 +157,7 @@
     {
         case SB_HORZ: infoPtr = (SCROLLBAR_INFO *)wndPtr->pHScroll; break;
         case SB_VERT: infoPtr = (SCROLLBAR_INFO *)wndPtr->pVScroll; break;
-        case SB_CTL:  {
-				HGLOBAL hmem;
-				hmem = wndPtr->wExtra[0] ;
-				infoPtr = GlobalLock(hmem);
-				GlobalUnlock(hmem);
-			}
-		break;
+        case SB_CTL:  infoPtr = (SCROLLBAR_INFO *)wndPtr->wExtra; break;
         default:
             WIN_ReleaseWndPtr( wndPtr );
             return NULL;


More information about the wine-devel mailing list