Add an error check to every setsockopt call in uxnet.c.
[sgt/putty] / windows / winmisc.c
index f54e8a4..c74f1e7 100644 (file)
@@ -68,6 +68,16 @@ Filename *filename_deserialise(void *vdata, int maxsize, int *used)
     return filename_from_str(data);
 }
 
+#ifndef NO_SECUREZEROMEMORY
+/*
+ * Windows implementation of smemclr (see misc.c) using SecureZeroMemory.
+ */
+void smemclr(void *b, size_t n) {
+    if (b && n > 0)
+        SecureZeroMemory(b, n);
+}
+#endif
+
 char *get_username(void)
 {
     DWORD namelen;