From 3c1f26970c54805c01db8dc10e3053fd1eed19c9 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 4 Mar 2015 23:42:40 +0100 Subject: [PATCH] d3dxof-Cleanup: Update patchset to use assignment instead of memcpy. --- ...straight-assignement-instead-of-using-mem.patch} | 13 +++++++------ patches/patchinstall.sh | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) rename patches/d3dxof-Cleanup/{0001-d3dxof-Use-sizeof-GUID-instead-of-hardcoding-the-val.patch => 0001-d3dxof-Use-straight-assignement-instead-of-using-mem.patch} (75%) diff --git a/patches/d3dxof-Cleanup/0001-d3dxof-Use-sizeof-GUID-instead-of-hardcoding-the-val.patch b/patches/d3dxof-Cleanup/0001-d3dxof-Use-straight-assignement-instead-of-using-mem.patch similarity index 75% rename from patches/d3dxof-Cleanup/0001-d3dxof-Use-sizeof-GUID-instead-of-hardcoding-the-val.patch rename to patches/d3dxof-Cleanup/0001-d3dxof-Use-straight-assignement-instead-of-using-mem.patch index 97d3c860..63c32d4d 100644 --- a/patches/d3dxof-Cleanup/0001-d3dxof-Use-sizeof-GUID-instead-of-hardcoding-the-val.patch +++ b/patches/d3dxof-Cleanup/0001-d3dxof-Use-straight-assignement-instead-of-using-mem.patch @@ -1,14 +1,15 @@ -From 60d8abcd74abb34f8922c7b33742d73c47773ddf Mon Sep 17 00:00:00 2001 +From d18752b72603e91c7bbbbfa623c83f3d13112ca1 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 22 Oct 2012 21:00:52 +0200 -Subject: d3dxof: Use sizeof(GUID) instead of hardcoding the value. +Subject: d3dxof: Use straight assignement instead of using memcpy with + hardcoded size. --- dlls/d3dxof/d3dxof.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c -index 88647cf..d612109 100644 +index 88647cf..8888d8b 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -619,7 +619,7 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData* iface, LPGUID @@ -16,7 +17,7 @@ index 88647cf..d612109 100644 return DXFILEERR_BADVALUE; - memcpy(pGuid, &This->pobj->class_id, 16); -+ memcpy(pGuid, &This->pobj->class_id, sizeof(GUID)); ++ *pGuid = This->pobj->class_id; return DXFILE_OK; } @@ -25,7 +26,7 @@ index 88647cf..d612109 100644 return DXFILEERR_BADVALUE; - memcpy(&guid, &This->pobj->type, 16); -+ memcpy(&guid, &This->pobj->type, sizeof(GUID)); ++ guid = This->pobj->type; *pguid = &guid; return DXFILE_OK; @@ -34,7 +35,7 @@ index 88647cf..d612109 100644 return DXFILEERR_BADVALUE; - memcpy(pGuid, &This->ptarget->class_id, 16); -+ memcpy(pGuid, &This->ptarget->class_id, sizeof(GUID)); ++ *pGuid = This->ptarget->class_id; return DXFILE_OK; } diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index f7c3bbbf..168d79be 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -1556,9 +1556,9 @@ fi # | * dlls/d3dxof/d3dxof.c # | if test "$enable_d3dxof_Cleanup" -eq 1; then - patch_apply d3dxof-Cleanup/0001-d3dxof-Use-sizeof-GUID-instead-of-hardcoding-the-val.patch + patch_apply d3dxof-Cleanup/0001-d3dxof-Use-straight-assignement-instead-of-using-mem.patch ( - echo '+ { "Christian Costa", "d3dxof: Use sizeof(GUID) instead of hardcoding the value.", 1 },'; + echo '+ { "Christian Costa", "d3dxof: Use straight assignement instead of using memcpy with hardcoded size.", 1 },'; ) >> "$patchlist" fi