Commit graph

44928 commits

Author SHA1 Message Date
Aleksey Bragin 85f0fb63f3 [USETUP]
- Fix a buffer overflow (overread) when adding a locale key to the registry. The history of this bug is funny:
1. Eric wrote the code, which sets a key of REG_SZ type, as 4 widechars plus terminating zero, but passes 8 as the bytesize of the buffer. It's not fully correct (a terminating zero is absent from the bytesize of the buffer, but MSDN doesn't specify if it should be added or not, and hardcoding "8" is not the best idea too) but not dramatic. That was revision 9596, 7 years ago.
2. Lentin notices something is not right in this code, and decides to "fix" it by multiplying that same hardcoded value by.... guess what? sizeof(PWCHAR)! That is, size of a pointer, which on an x86 would be 4 bytes. Massive out of bounds access obviously happens. That was revision 31642, 3 years ago.
3. Very soon Colin reshuffles and improves the code based on patch #2635, however the problem still goes unnoticed (r31655+).
See issue #5810 for more details.

svn path=/trunk/; revision=50968
2011-03-04 18:18:05 +00:00
Aleksey Bragin 2bf17fadd1 - Revert 47615. Please fix actual sysreg instead of adding inconsistency between 1st, 2nd and 3rd stages debugging connections. This should fix sysreg3's inability to do backtraces.
See issue #5811 for more details.

svn path=/trunk/; revision=50967
2011-03-04 16:57:56 +00:00
Jérôme Gardou ab803f82ce [RTL]
- Fix compilation when NDEBUG is not defined

svn path=/trunk/; revision=50966
2011-03-04 03:42:38 +00:00
Timo Kreuzer 54010b7e9e [USER32_APITEST]
Add a cursor and an icon and use those instead of system cursor. Fixes tests on Windows.

svn path=/trunk/; revision=50965
2011-03-03 21:49:44 +00:00
Johannes Anderwald aa66728228 [SHELL32]
- Return the icon index, not the icon id
- Fixes bug 5742

svn path=/trunk/; revision=50964
2011-03-03 21:22:47 +00:00
Eric Kohl 303a449b35 [SETUPAPI]
Implement CM_Register_Device_Interface[_Ex]A/W and CM_Unregister_Device_Interface[_Ex]A/W.

svn path=/trunk/; revision=50963
2011-03-03 19:53:26 +00:00
James Tabor 3bec896bc6 [Win32k]
- Missed the clearing of the clip region for the window at the end of of its life. The mouse is looking for the window, doing so, scanning through all of them, even the ones that are at deaths door.


svn path=/trunk/; revision=50962
2011-03-03 17:32:20 +00:00
James Tabor 1fd7d93b5d [Win32k]
- Fix the select of the clip region for a window. Apologies to Rafal Harabien select works like select, also don't
assume the original author is always right.



svn path=/trunk/; revision=50961
2011-03-03 13:59:17 +00:00
Timo Kreuzer dba4ecb162 [WIN32K]
Acquire ownership of monitor region before deleting it.

svn path=/trunk/; revision=50960
2011-03-02 23:02:12 +00:00
Timo Kreuzer 7110c88cc0 [WIN32K]
Revert part of r50941. First its architecturally unclean to lock a DC in a USER function, 2nd its a bug to keep the lock while sending a message.

svn path=/trunk/; revision=50959
2011-03-02 22:33:14 +00:00
Pierre Schweitzer 8de09facc2 [FASTFAT]
- Prevent code duplication by using vfatAttachFCBToFileObject() for volume opening, instead of rewritting the whole function.
- Properly check requested disposition when opening a volume.
This fixes bug #5839. Trying to exec \\.\C: in explorer run dialog now ends with an error, as it does on Windows.

svn path=/trunk/; revision=50958
2011-03-02 21:51:33 +00:00
Timo Kreuzer 2edb1c468c [SHELL32]
patch by Thomas Faber: fix a TRACE

svn path=/trunk/; revision=50957
2011-03-02 13:33:19 +00:00
Timo Kreuzer 3d476667b6 [USER32]
Patch by Thomas Faber:
When the Edit receives WM_KILLFOCUS, it will notify its parent (the ListView)
of losing focus, which in turn will send WM_CLOSE to destroy the edit control.
This will cause the edit to receive WM_DESTROY and free the EDITSTATE.
When control returns to the WM_KILLFOCUS handler, this would call
EDIT_UnlockBuffer on the now invalid EDITSTATE.
Fix this by checking the validity of the EDITSTATE before calling EDIT_UnlockBuffer.
Fixes explorer crash, when cancelling file renaming.
See issue #5895 for more details.

svn path=/trunk/; revision=50956
2011-03-02 13:23:13 +00:00
Timo Kreuzer e12dbcd77d [USER32]
Sync edit.c with wine head.

svn path=/trunk/; revision=50955
2011-03-02 13:13:10 +00:00
Aleksey Bragin 97d2212a19 [RTL/PATH]
- Update path.c code to Wine 1.3.14. Fixes a buffer overwrite happening in RtlDosSearchPath_U() when invoked by "shell32_winetest.exe shlexec".
- RtlDosPathNameToNtPathName_U remains unsynced.
- Author names added to the header of the file.
See issue #5964 for more details.

svn path=/trunk/; revision=50954
2011-03-02 11:42:30 +00:00
Timo Kreuzer 92654a7e4e [USER32]
Go back to use of SetWindowLongW instead of GetWindowLongPtrW for GWL_STYLE to reduce diff to wine code.

svn path=/trunk/; revision=50953
2011-03-02 11:05:51 +00:00
Timo Kreuzer 8b1f0d1966 [USER32]
Revert a previous change that shouldn't have been comitted yet.

svn path=/trunk/; revision=50952
2011-03-02 10:57:56 +00:00
Timo Kreuzer e5134f6b7b [FORMATTING]
user32/edit.c: Sync formatting changes from wine head, removes some unneccessary casts, no code actual change.

svn path=/trunk/; revision=50951
2011-03-02 10:55:07 +00:00
Jérôme Gardou 8be61c1a29 [GDI32_APITESTS]
- Test behaviour of SetDIBits for 1bpp bitmaps.
  - Add small test to GetPixel just to verify that SetDIBits doesn't say BS.

svn path=/trunk/; revision=50950
2011-03-02 01:15:10 +00:00
Jérôme Gardou 5e5532d3ef [WIN32K]
- in 1bpp bitmaps, 0 means white. Take that into in SetDIBits
  - fix a fixme in XLATEOBJ implementation
  - remove useless field from ROS_DCINFO
Fixes fox audio player GUI :-) Enjoy!

svn path=/trunk/; revision=50949
2011-03-02 00:15:57 +00:00
Jérôme Gardou c77754b87d [WIN32K]
- only lock DC if asked to in NtGdiSetDIBits.

svn path=/trunk/; revision=50948
2011-03-01 21:45:45 +00:00
Jérôme Gardou d5954abbf2 [[GDI32_APITEST]
- actually make a test, with == instead of =, relevant bits sets, good test value, etc.

svn path=/trunk/; revision=50947
2011-03-01 21:32:58 +00:00
Jérôme Gardou a5115608c9 [GDI32_APITEST]
- add a basic test for SetDIBits

svn path=/trunk/; revision=50946
2011-03-01 20:50:47 +00:00
Jérôme Gardou 1a7f618d3b [WIN32K]
- Dismiss alpha channel when creating a solid brush.
Finally fixes VLC icons and numerous winetests.

svn path=/trunk/; revision=50945
2011-03-01 14:44:53 +00:00
Timo Kreuzer 788c6760f7 [WIN32K]
Silence some DPRINTS

svn path=/trunk/; revision=50944
2011-03-01 13:27:19 +00:00
Timo Kreuzer a53926e3bf [USER32_APITEST]
Patch by Thomas Faber: some tests for GetMessage and PeekMessage

svn path=/trunk/; revision=50943
2011-03-01 12:05:39 +00:00
Timo Kreuzer dedaab13ab [WIN32K]
Do raster operation on 4 bytes instead of only 3. Fixes ...
maybe noone has noticed yet ;-)

svn path=/trunk/; revision=50942
2011-03-01 09:17:58 +00:00
Jérôme Gardou 1ea8829ec1 [WIN32K]
- Raster operations in user mode are on higher bytes, whereas they are on lower bytes for drivers. Try to clarify this situation.
  - Add sanity check about what was said previously.
  - Implement masking in EngBitBlt
  - Rewrite NtGdiMaskBlt accordingly
  - Realize the palette when selecting it into a device DC.
  - When applying raster operation, do so only on 24 bits, we don't support alpha channel in win32k
This fixes VLC pink icons, Timo's MaskBlt tests and probably a lot of other things.
[SHELL32]
  - Use correct (?) raster operations for drawing sjortcuts.
Also note that now NtGdiMaskBlt locks the device contexts : this should avoid some race conditions, such as icons drawn on top of windows and the like.
Win32k sucks less.
So does reactos.
Dedicated to Timo. Sleep well, mate.

svn path=/trunk/; revision=50941
2011-03-01 01:03:58 +00:00
Jérôme Gardou 56cfac043d [FORMATTING]
fix dibobj.c, to please pigglesworth

svn path=/trunk/; revision=50940
2011-02-28 23:46:02 +00:00
Jérôme Gardou 5896730829 [FORMATTING]
fix formatting. No code change

svn path=/trunk/; revision=50939
2011-02-28 23:29:36 +00:00
Timo Kreuzer 962c0688f5 [GDI32_APITEST]
Fix a bug

svn path=/trunk/; revision=50938
2011-02-28 20:04:10 +00:00
Timo Kreuzer e9b7bf6df2 [GDI32_APITEST]
More tests for MaskBlt

svn path=/trunk/; revision=50937
2011-02-28 18:01:12 +00:00
James Tabor edda07b8ac [Win32k|User32]
- Use User32 GetWindowRgnBox, still passing both wine msg SetWindowRgn and win winregion tests, see bug 5959.

svn path=/trunk/; revision=50936
2011-02-28 16:45:57 +00:00
Kamil Hornicek 9fb8200d9b [WIN32K]
Fix calculating of ScanLines and source point in NtGdiGetDIBitsInternal for top-down bitmaps to more closely mimic win xp behavior. (Timo - high five for your test app)
See issue #5524 for more details.

svn path=/trunk/; revision=50935
2011-02-28 12:47:01 +00:00
James Tabor c6182beb15 [Win32k|User32]
- Use User32 GetWindowRgnBox, still passing both wine msg SetWindowRgn and win winregion tests, see bug 5959.

svn path=/trunk/; revision=50934
2011-02-28 09:10:43 +00:00
James Tabor 823118e08a [Win32k|User32]
- Clarify the meaning and the use of 0, 1 and 2 for user window regions, wine never did. Noticing patches not corresponding in correctness and understanding, leaving potential crashes in the DCE code, which depend on these types.
- Patch based on Rafal Harabien patch, fixes wine msg SetWindowRgn test, see also bug 5959.

svn path=/trunk/; revision=50933
2011-02-28 06:31:44 +00:00
Timo Kreuzer efd76a4a9c [WIN32K]
addendum to r50928: 24 and 32bpp BI_RGB bitmaps are BGR

svn path=/trunk/; revision=50932
2011-02-28 00:48:19 +00:00
Timo Kreuzer 04e49a00e3 [GDI32]
Revert r50519 and r50519

svn path=/trunk/; revision=50931
2011-02-28 00:19:32 +00:00
Aleksey Bragin 62de69219a [SERVICES]
- Protect whole contents of ScmStartService() with a critical section instead of just a few parts of ScmStartUserModeService(). Seems to fix the comment #8 issue of bug #5924.

svn path=/trunk/; revision=50930
2011-02-27 23:07:04 +00:00
Timo Kreuzer 27b33c3045 [GDI32_APITEST]
More testcases for SelectObject and GetDIBits

svn path=/trunk/; revision=50929
2011-02-27 22:00:13 +00:00
Jérôme Gardou 5de8339cd1 [WIN32K]
- remove duplicate prototype
  - use RGB macro where possible
  - we create BGR palette for RGB DIB sections, let's do the other way around
  - simplify overcomplicated IntGetDIBColorTable
  - Add a first implementation of IntRealizePalette
No, it's not the VLC icons bugfix

svn path=/trunk/; revision=50928
2011-02-27 21:45:43 +00:00
Aleksey Bragin ccebf72731 [RTL/HEAP]
- A few comments, and a new structure definition (currently unused). Absolutely no changes to the actual code.

svn path=/trunk/; revision=50927
2011-02-27 19:36:46 +00:00
Eric Kohl a328e318a1 [SERVICES]
Protect the service start and sending of control packages by critical sections. This way, services will be started one by one and control packages will also be sent one by one.

Please test if this fixes bug #5924.

svn path=/trunk/; revision=50926
2011-02-27 19:25:14 +00:00
Aleksey Bragin 061ec721f9 - Promote service start failures from TRACE to ERR.
See issue #5924 for more details.

svn path=/trunk/; revision=50925
2011-02-27 19:09:45 +00:00
Timo Kreuzer 69d9838266 [NTOSKRNL]
Fix aborting of backtraces

svn path=/trunk/; revision=50924
2011-02-27 19:03:12 +00:00
Christoph von Wittich 5e0cafbbda [imagehlp]
-partial winesync

svn path=/trunk/; revision=50923
2011-02-27 18:49:27 +00:00
Christoph von Wittich 2f6bcbb66c [imagehlp_winetest]
-add imagehlp_winetest

svn path=/trunk/; revision=50922
2011-02-27 18:30:50 +00:00
Timo Kreuzer 736733be4d [WIN32K]
- mark surface as not selected in DC_vSelectSurface when its released from a DC
NtGdiSelectBitmap: 
- Don't allow selecting a bitmap into a dc that is already selected!
- Use DC_vSelectSurface instead of manually selecting
- set the DC size based on bitmap size

svn path=/trunk/; revision=50921
2011-02-27 17:51:37 +00:00
Timo Kreuzer 760940d0bd [WIN32K]
- In NtGdiGetDIBitsInternal use a shared lock for the bitmaps and provide background colors when initializing the XLATEOBJ. This fixes mono bitmaps passed to GetDIBits. (no it does not fix pink icons in VLC)
- In BuildDIBPalette don't handle 15bpp, its not valid. and 16 bpp is 555, this is documented in MSDN.

svn path=/trunk/; revision=50920
2011-02-27 17:38:18 +00:00
Timo Kreuzer eb7b3a6e70 Fix build
svn path=/trunk/; revision=50919
2011-02-27 17:31:54 +00:00