~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Introduce a new utility function smemclr(), which memsets things to
[sgt/putty]
/
windows
/
winmisc.c
diff --git
a/windows/winmisc.c
b/windows/winmisc.c
index
f54e8a4
..
2166f45
100644
(file)
--- a/
windows/winmisc.c
+++ b/
windows/winmisc.c
@@
-68,6
+68,14
@@
Filename *filename_deserialise(void *vdata, int maxsize, int *used)
return filename_from_str(data);
}
+/*
+ * Windows implementation of smemclr (see misc.c) using SecureZeroMemory.
+ */
+void smemclr(void *b, size_t n) {
+ if (b && n > 0)
+ SecureZeroMemory(b, n);
+}
+
char *get_username(void)
{
DWORD namelen;