mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-24 06:25:35 +02:00
Added right implementation of explicit_bzero
This commit is contained in:
parent
936508e00c
commit
07537eb47c
@ -1707,8 +1707,6 @@ typedef long ssize_t;
|
||||
|
||||
|
||||
#define HAVE_EXPLICIT_BZERO
|
||||
#define explicit_bzero(p,l) memset((void *)(p),0,(size_t)(l))
|
||||
#define bzero(p,l) memset((void *)(p),0,(size_t)(l))
|
||||
|
||||
#define WIN32_ZLIB_NO 1
|
||||
|
||||
|
@ -138,3 +138,8 @@ struct iovec
|
||||
size_t iov_len;
|
||||
};
|
||||
|
||||
|
||||
#define bzero(p,l) memset((void *)(p),0,(size_t)(l))
|
||||
|
||||
void
|
||||
explicit_bzero(void *b, size_t len);
|
||||
|
@ -10,4 +10,9 @@ int usleep(unsigned int useconds)
|
||||
pid_t waitpid(pid_t pid, int *status, int options) {
|
||||
/* TODO - implement this*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
explicit_bzero(void *b, size_t len) {
|
||||
SecureZeroMemory(b, len);
|
||||
}
|
@ -23,14 +23,6 @@ explicit_bzero(void *p, size_t n)
|
||||
|
||||
#else /* HAVE_MEMSET_S */
|
||||
|
||||
#ifdef WIN32_FIXME
|
||||
void
|
||||
explicit_bzero(void *p, size_t n)
|
||||
{
|
||||
bzero(p, n);
|
||||
}
|
||||
#else
|
||||
|
||||
/*
|
||||
* Indirect bzero through a volatile pointer to hopefully avoid
|
||||
* dead-store optimisation eliminating the call.
|
||||
@ -43,8 +35,6 @@ explicit_bzero(void *p, size_t n)
|
||||
ssh_bzero(p, n);
|
||||
}
|
||||
|
||||
#endif /* WIN32_FIXME */
|
||||
|
||||
#endif /* HAVE_MEMSET_S */
|
||||
|
||||
#endif /* HAVE_EXPLICIT_BZERO */
|
||||
|
Loading…
x
Reference in New Issue
Block a user