summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/k5-int.h5
-rw-r--r--src/include/k5-platform.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 2edf1d511..3d5268836 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -790,8 +790,9 @@ static inline void zap(void *ptr, size_t len)
asm volatile ("" : : "g" (ptr), "g" (len));
}
#else
-# define zap(ptr, len) memset((void *)(volatile void *)ptr, 0, len)
-#endif /* WIN32 */
+/* Use a function from libkrb5support to defeat inlining. */
+# define zap(ptr, len) krb5int_zap(ptr, len)
+#endif
/* Convenience function: zap and free ptr if it is non-NULL. */
static inline void
diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h
index 7c1c57d70..ee3730ad0 100644
--- a/src/include/k5-platform.h
+++ b/src/include/k5-platform.h
@@ -976,6 +976,8 @@ extern int krb5int_mkstemp(char *);
#define mkstemp krb5int_mkstemp
#endif
+extern void krb5int_zap(void *ptr, size_t len);
+
/* Fudge for future adoption of gettext or the like. */
#ifndef _
#define _(X) (X)