Author: fireball
Date: Tue Sep 21 08:24:15 2010
New Revision: 48842
URL:
http://svn.reactos.org/svn/reactos?rev=48842&view=rev
Log:
[DDRAW]
- Jerome Gardou: Avoid buffer overrun in IDirectDraw::GetCaps().
See issue #5006 for more details.
Modified:
branches/reactx/reactos/dll/directx/ddraw/Ddraw/GetCaps.c
Modified: branches/reactx/reactos/dll/directx/ddraw/Ddraw/GetCaps.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddra…
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/Ddraw/GetCaps.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/Ddraw/GetCaps.c [iso-8859-1] Tue Sep 21
08:24:15 2010
@@ -102,7 +102,7 @@
if (CoreCaps->dwSize == sizeof(DDCORECAPS))
{
- memcpy(&myCaps->dwCaps, &CoreCaps->dwCaps,
sizeof(DDCAPS_DX3));
+ memcpy(myCaps, CoreCaps, sizeof(DDCAPS_DX3));
}
myCaps->dwVidMemFree = dwFree;
@@ -127,7 +127,7 @@
if (CoreCaps->dwSize == sizeof(DDCORECAPS))
{
- memcpy(&myCaps->dwCaps, &CoreCaps->dwCaps,
sizeof(DDCORECAPS));
+ memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
}
myCaps->dwVidMemFree = dwFree;
@@ -153,7 +153,7 @@
if (CoreCaps->dwSize == sizeof(DDCORECAPS))
{
- memcpy(&myCaps->dwCaps, &CoreCaps->dwCaps,
sizeof(DDCORECAPS));
+ memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
}
myCaps->dwVidMemFree = dwFree;
@@ -209,7 +209,7 @@
if (CoreCaps->dwSize == sizeof(DDCORECAPS))
{
- memcpy(&myCaps->dwCaps, &CoreCaps->dwCaps,
sizeof(DDCAPS_DX3));
+ memcpy(myCaps, CoreCaps, sizeof(DDCAPS_DX3));
}
myCaps->dwVidMemFree = dwFree;
@@ -234,7 +234,7 @@
if (CoreCaps->dwSize == sizeof(DDCORECAPS))
{
- memcpy(&myCaps->dwCaps, &CoreCaps->dwCaps,
sizeof(DDCORECAPS));
+ memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
}
myCaps->dwVidMemFree = dwFree;
@@ -260,7 +260,7 @@
if (CoreCaps->dwSize == sizeof(DDCORECAPS))
{
- memcpy(&myCaps->dwCaps, &CoreCaps->dwCaps,
sizeof(DDCORECAPS));
+ memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
}
myCaps->dwVidMemFree = dwFree;