Merge branch 'master' of github.com:awakecoding/FreeRDP
This commit is contained in:
commit
975562487d
@ -30,9 +30,11 @@
|
|||||||
|
|
||||||
#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
|
#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
|
||||||
#define MoveMemory(Destination, Source, Length) memmove((Destination), (Source), (Length))
|
#define MoveMemory(Destination, Source, Length) memmove((Destination), (Source), (Length))
|
||||||
#define FillMemory(Destination, Length, Fill) memset((Destination), (Fill), (Length))
|
#define FillMemory(Destination, Length, Fill) memset((Destination), (Fill), (Length))
|
||||||
#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
|
#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
|
||||||
|
|
||||||
|
WINPR_API PVOID SecureZeroMemory(PVOID ptr, SIZE_T cnt);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <winpr/heap.h>
|
#include <winpr/heap.h>
|
||||||
|
@ -28,6 +28,17 @@
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
|
||||||
|
PVOID SecureZeroMemory(PVOID ptr, SIZE_T cnt)
|
||||||
|
{
|
||||||
|
volatile BYTE* p = ptr;
|
||||||
|
|
||||||
|
while (cnt--)
|
||||||
|
{
|
||||||
|
*p = 0;
|
||||||
|
p++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user