diff options
author | Richard Levitte <levitte@openssl.org> | 2002-12-03 16:06:40 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-12-03 16:06:40 +0000 |
commit | 470799152037586dd51e9ec7d39304ddca873b22 (patch) | |
tree | 56b0141ebfcaecbd2dbcb17d16d2dc3ce56b0e2b /crypto/mem_clr.c | |
parent | 7a1f92fdc39c5840cb8f491fa59a6ae5b9b5f610 (diff) | |
download | openssl-470799152037586dd51e9ec7d39304ddca873b22.tar.gz |
Make CRYPTO_cleanse() independent of endianness.
Diffstat (limited to 'crypto/mem_clr.c')
-rw-r--r-- | crypto/mem_clr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/mem_clr.c b/crypto/mem_clr.c index 0b72966cfa..e4b7f540b0 100644 --- a/crypto/mem_clr.c +++ b/crypto/mem_clr.c @@ -68,7 +68,7 @@ void OPENSSL_cleanse(void *ptr, size_t len) while(loop--) { *(p++) = cleanse_ctr; - cleanse_ctr += (17 + (((unsigned char *)&p)[sizeof(unsigned char *)-1] & 0xF)); + cleanse_ctr += (17 + (unsigned char)((int)p & 0xF)); } if(memchr(ptr, cleanse_ctr, len)) cleanse_ctr += 63; |