changeset 162:bc4e3ac2dd5a libtomcrypt

make data pointers volatile so that memory zeroing won't get optimised away
author Matt Johnston <matt@ucc.asn.au>
date Sun, 02 Jan 2005 17:09:05 +0000
parents b4c6e7f276e9
children cd1143579f00
files zeromem.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/zeromem.c	Mon Dec 20 14:46:40 2004 +0000
+++ b/zeromem.c	Sun Jan 02 17:09:05 2005 +0000
@@ -12,7 +12,7 @@
 
 void zeromem(void *dst, size_t len)
 {
- unsigned char *mem = (unsigned char *)dst;
+ volatile unsigned char *mem = (unsigned char *)dst;
  _ARGCHK(dst != NULL);
  while (len-- > 0)
     *mem++ = 0;