Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/crypto/dist/kame/racoon/missing/crypto/sha2 Pull up rev...



details:   https://anonhg.NetBSD.org/src/rev/b643a823355d
branches:  netbsd-1-6
changeset: 530649:b643a823355d
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Sep 05 13:46:24 2003 +0000

description:
Pull up revision 1.5 (requested by itojun in ticket #1446):
bzero() 2nd arg mistake.  found by openbsd guys.  from kame

diffstat:

 crypto/dist/kame/racoon/missing/crypto/sha2/sha2.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (57 lines):

diff -r 7c2369ec0e58 -r b643a823355d crypto/dist/kame/racoon/missing/crypto/sha2/sha2.c
--- a/crypto/dist/kame/racoon/missing/crypto/sha2/sha2.c        Fri Sep 05 13:42:52 2003 +0000
+++ b/crypto/dist/kame/racoon/missing/crypto/sha2/sha2.c        Fri Sep 05 13:46:24 2003 +0000
@@ -610,7 +610,7 @@
        }
 
        /* Clean up state data: */
-       bzero(context, sizeof(context));
+       bzero(context, sizeof(*context));
        usedspace = 0;
 }
 
@@ -631,7 +631,7 @@
                }
                *buffer = (char)0;
        } else {
-               bzero(context, sizeof(context));
+               bzero(context, sizeof(*context));
        }
        bzero(digest, SHA256_DIGEST_LENGTH);
        return buffer;
@@ -940,7 +940,7 @@
        }
 
        /* Zero out state data */
-       bzero(context, sizeof(context));
+       bzero(context, sizeof(*context));
 }
 
 char *SHA512_End(SHA512_CTX* context, char buffer[]) {
@@ -960,7 +960,7 @@
                }
                *buffer = (char)0;
        } else {
-               bzero(context, sizeof(context));
+               bzero(context, sizeof(*context));
        }
        bzero(digest, SHA512_DIGEST_LENGTH);
        return buffer;
@@ -1015,7 +1015,7 @@
        }
 
        /* Zero out state data */
-       bzero(context, sizeof(context));
+       bzero(context, sizeof(*context));
 }
 
 char *SHA384_End(SHA384_CTX* context, char buffer[]) {
@@ -1035,7 +1035,7 @@
                }
                *buffer = (char)0;
        } else {
-               bzero(context, sizeof(context));
+               bzero(context, sizeof(*context));
        }
        bzero(digest, SHA384_DIGEST_LENGTH);
        return buffer;



Home | Main Index | Thread Index | Old Index