27 Jul
2004
27 Jul
'04
9:27 a.m.
Hi.
Timo Sirainen wrote:
On Sun, 2004-07-25 at 15:40, Joshua Goodall wrote:
I fleshed this out a bit. OK, a lot, because this was done to improve interoperability with OpenLDAP. The attached diff:
Committed with a few minor changes. And btw:
+#define STRWIPE(s) do { \
- char *c; \
- for (c = s; *c != '\0'; c++) \
+} while (0)*c = '\0'; \
safe_memset() exists pretty much for this reason. Compilers may sooner or later optimize out this kind of code because it seems useless to it. Microsoft's compilers already do in some cases.
That's called bzero() on *nix (POSIX.1).
Lets now pray that MS compilers won't optimize out security-critical parts of code. Ha ha. Not funny.
--
./lxnt