Alexandre Julliard : ddraw: Use SecureZeroMemory to clear the clipper vtbl.
Module: wine Branch: master Commit: 540219df966edc35d29a6be6fc2beebb92c3b7d6 URL: https://gitlab.winehq.org/wine/wine/-/commit/540219df966edc35d29a6be6fc2beeb... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 7 22:58:40 2023 +0100 ddraw: Use SecureZeroMemory to clear the clipper vtbl. --- dlls/ddraw/clipper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/ddraw/clipper.c b/dlls/ddraw/clipper.c index 9718ac0b162..3159a34cb5a 100644 --- a/dlls/ddraw/clipper.c +++ b/dlls/ddraw/clipper.c @@ -109,7 +109,9 @@ static ULONG WINAPI ddraw_clipper_Release(IDirectDrawClipper *iface) { if (clipper->region) DeleteObject(clipper->region); - clipper->IDirectDrawClipper_iface.lpVtbl = NULL; /* Should help with detecting freed clippers. */ + /* make sure the object is no longer considered valid */ + SecureZeroMemory( &clipper->IDirectDrawClipper_iface.lpVtbl, + sizeof(clipper->IDirectDrawClipper_iface.lpVtbl) ); free(clipper); }
participants (1)
-
Alexandre Julliard