Re: [ros-dev] [ros-diffs] [jgardou] 66342: [WIN32SS/NTGDI] - Reject bits data early in SetBitmapBits when it's clear that they can't fit in the destination bitmap. Fixes ugly Office 2007 rulers showin
Is this a bug in Office 2007 or are we doing something wrong here? Am 17.02.2015 um 21:41 schrieb jgar...@svn.reactos.org: Author: jgardou Date: Tue Feb 17 20:41:51 2015 New Revision: 66342 URL: http://svn.reactos.org/svn/reactos?rev=66342view=rev Log: [WIN32SS/NTGDI] - Reject bits data early in SetBitmapBits when it's clear that they can't fit in the destination bitmap. Fixes ugly Office 2007 rulers showing garbage. Modified: trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c Modified: trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c?rev=66342r1=66341r2=66342view=diff == --- trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c [iso-8859-1] Tue Feb 17 20:41:51 2015 @@ -11,7 +11,8 @@ #define NDEBUG #include debug.h -void +static +int NTAPI UnsafeSetBitmapBits( PSURFACE psurf, @@ -32,6 +33,9 @@ lDeltaDst = psurf-SurfObj.lDelta; lDeltaSrc = WIDTH_BYTES_ALIGN16(nWidth, cBitsPixel); +if (cjBits (cjBits (lDeltaSrc * nHeight))) +return 0; + while (nHeight--) { /* Copy one line */ @@ -40,6 +44,7 @@ pjDst += lDeltaDst; } +return 1; } HBITMAP @@ -538,9 +543,8 @@ _SEH2_TRY { -ProbeForRead(pUnsafeBits, Bytes, 1); -UnsafeSetBitmapBits(psurf, Bytes, pUnsafeBits); -ret = 1; +ProbeForRead(pUnsafeBits, Bytes, sizeof(WORD)); +ret = UnsafeSetBitmapBits(psurf, Bytes, pUnsafeBits); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { smime.p7s Description: S/MIME Cryptographic Signature ___ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Re: [ros-dev] [ros-diffs] [jgardou] 66342: [WIN32SS/NTGDI] - Reject bits data early in SetBitmapBits when it's clear that they can't fit in the destination bitmap. Fixes ugly Office 2007 rulers showin
I don't really see what we could be doing wrong here. We're not responsible for the data an application passes to us. If we're not capable of correctly giving back the tuple (width,height, bpp) which permits to calculate the buffer size, we'd better stop everything and start thinking about raising goats in Greenland. Le 18/02/2015 09:40, Timo Kreuzer a écrit : Is this a bug in Office 2007 or are we doing something wrong here? Am 17.02.2015 um 21:41 schrieb jgar...@svn.reactos.org: Author: jgardou Date: Tue Feb 17 20:41:51 2015 New Revision: 66342 URL: http://svn.reactos.org/svn/reactos?rev=66342view=rev Log: [WIN32SS/NTGDI] - Reject bits data early in SetBitmapBits when it's clear that they can't fit in the destination bitmap. Fixes ugly Office 2007 rulers showing garbage. Modified: trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c Modified: trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c?rev=66342r1=66341r2=66342view=diff == --- trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c[iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c[iso-8859-1] Tue Feb 17 20:41:51 2015 @@ -11,7 +11,8 @@ #define NDEBUG #include debug.h -void +static +int NTAPI UnsafeSetBitmapBits( PSURFACE psurf, @@ -32,6 +33,9 @@ lDeltaDst = psurf-SurfObj.lDelta; lDeltaSrc = WIDTH_BYTES_ALIGN16(nWidth, cBitsPixel); +if (cjBits (cjBits (lDeltaSrc * nHeight))) +return 0; + while (nHeight--) { /* Copy one line */ @@ -40,6 +44,7 @@ pjDst += lDeltaDst; } +return 1; } HBITMAP @@ -538,9 +543,8 @@ _SEH2_TRY { -ProbeForRead(pUnsafeBits, Bytes, 1); -UnsafeSetBitmapBits(psurf, Bytes, pUnsafeBits); -ret = 1; +ProbeForRead(pUnsafeBits, Bytes, sizeof(WORD)); +ret = UnsafeSetBitmapBits(psurf, Bytes, pUnsafeBits); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ___ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev ___ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
[ros-dev] VirtualBox Testslave
Hi all, As tests have shown that VirtualBox doesn't work properly inside an already virtualized environment, ReactOS Deutschland e.V. has just ordered a tiny Intel NUC that will serve as a VirtualBox Testslave. We plan to set it up right next to our Buildslaves, so that every ISO could possibly be regression-tested under VirtualBox. As a start, we plan to test the builds of the new MSVC Builder. The machine is powerful enough though to eventually test multiple ISOs simultaneously. I don't know about the current state of sysreg2 regarding VirtualBox support. To let this all happen as soon as possible, please ensure sysreg2 can fully handle VirtualBox once I set up the machine. Cheers, Colin smime.p7s Description: S/MIME Cryptographic Signature ___ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Re: [ros-dev] VirtualBox Testslave
Hi Colin, I will have a look at sysreg2. Please make sure that the NUC is setup with the latest LTS. It will make the process smoother. Cheers, Pierre On 18/02/2015 11:17, Colin Finck wrote: Hi all, As tests have shown that VirtualBox doesn't work properly inside an already virtualized environment, ReactOS Deutschland e.V. has just ordered a tiny Intel NUC that will serve as a VirtualBox Testslave. We plan to set it up right next to our Buildslaves, so that every ISO could possibly be regression-tested under VirtualBox. As a start, we plan to test the builds of the new MSVC Builder. The machine is powerful enough though to eventually test multiple ISOs simultaneously. I don't know about the current state of sysreg2 regarding VirtualBox support. To let this all happen as soon as possible, please ensure sysreg2 can fully handle VirtualBox once I set up the machine. Cheers, Colin ___ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev -- Pierre Schweitzer pierre at reactos.org System Network Administrator Senior Kernel Developer ReactOS Deutschland e.V. smime.p7s Description: S/MIME Cryptographic Signature ___ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Re: [ros-dev] [ros-diffs] [jgardou] 66334: [NTOSKRNL/MM] - MiIsEntireRangeCommitted: Ensure the PTE we are checking is really faulted in. - Prefer MiPteToPde and MiPdeToPte (which should really be cal
it might fix an assert but the patch is incorrect. will this also take 6 months to revert? Best regards, Alex Ionescu On Tue, Feb 17, 2015 at 6:19 AM, jgar...@svn.reactos.org wrote: Author: jgardou Date: Tue Feb 17 14:19:05 2015 New Revision: 66334 URL: http://svn.reactos.org/svn/reactos?rev=66334view=rev Log: [NTOSKRNL/MM] - MiIsEntireRangeCommitted: Ensure the PTE we are checking is really faulted in. - Prefer MiPteToPde and MiPdeToPte (which should really be called MiFirstPteInPde) instead of MiAddressToPte and MiPteToAddress Fixes weird failed ASSERT in page fault handler when using DPH. Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c?rev=66334r1=66333r2=66334view=diff == --- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c[iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c[iso-8859-1] Tue Feb 17 14:19:05 2015 @@ -1994,14 +1994,13 @@ if (OnBoundary) { /* Is this PDE demand zero? */ -PointerPde = MiAddressToPte(PointerPte); +PointerPde = MiPteToPde(PointerPte); if (PointerPde-u.Long != 0) { /* It isn't -- is it valid? */ if (PointerPde-u.Hard.Valid == 0) { /* Nope, fault it in */ -PointerPte = MiPteToAddress(PointerPde); MiMakeSystemAddressValid(PointerPte, Process); } } @@ -2009,13 +2008,13 @@ { /* The PTE was already valid, so move to the next one */ PointerPde++; -PointerPte = MiPteToAddress(PointerPde); +PointerPte = MiPdeToPte(PointerPde); /* Is the entire VAD committed? If not, fail */ if (!Vad-u.VadFlags.MemCommit) return FALSE; -/* Everything is committed so far past the range, return true */ -if (PointerPte LastPte) return TRUE; +/* New loop iteration with our new, on-boundary PTE. */ +continue; } } ___ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev