diff --git a/include/winbase.h b/include/winbase.h index b07d4df41eb..4ec6f9a9db0 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2778,6 +2778,7 @@ WINBASEAPI UINT WINAPI _lwrite(HFILE,LPCSTR,UINT); #define MoveMemory RtlMoveMemory #define ZeroMemory RtlZeroMemory #define CopyMemory RtlCopyMemory +#define SecureZeroMemory RtlSecureZeroMemory /* Wine internal functions */ diff --git a/include/winnt.h b/include/winnt.h index 72c399b410f..de7622fbe6f 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -5436,6 +5436,14 @@ typedef enum _CM_ERROR_CONTROL_TYPE #define RtlFillMemory(Destination, Length, Fill) memset((Destination),(Fill),(Length)) #define RtlZeroMemory(Destination, Length) memset((Destination),0,(Length)) +static FORCEINLINE void *RtlSecureZeroMemory(void *buffer, SIZE_T length) +{ + volatile char *ptr = buffer; + + while (length--) *ptr++ = 0; + return buffer; +} + #include typedef struct _OBJECT_TYPE_LIST {