From 1b86f2c181c3c2b68eedfedb93a475dcdc4b5436 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 24 May 2004 21:04:34 +0000 Subject: [PATCH] * t_encrypt.c (compare_results): Declare static. (main): Free allocated memory before exit. * t_nfold.c (fold_kerberos): Change nbytes argument to unsigned. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16358 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/ChangeLog | 7 +++++++ src/lib/crypto/t_encrypt.c | 4 +++- src/lib/crypto/t_nfold.c | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 390f8188a..952aaa9a5 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,10 @@ +2004-05-24 Ezra Peisach + + * t_nfold.c (fold_kerberos): Change nbytes argument to unsigned. + + * t_encrypt.c (compare_results): Declare static. + (main): Free allocated memory before exit. + 2004-05-13 Ken Raeburn * Makefile.in (t_encrypt, t_prng, t_hmac, t_pkcs5, vectors, diff --git a/src/lib/crypto/t_encrypt.c b/src/lib/crypto/t_encrypt.c index e5f5c8a78..eb2378b5e 100644 --- a/src/lib/crypto/t_encrypt.c +++ b/src/lib/crypto/t_encrypt.c @@ -55,7 +55,7 @@ if( retval) { \ abort(); \ } else printf ("OK\n"); -int compare_results(krb5_data *d1, krb5_data *d2) +static int compare_results(krb5_data *d1, krb5_data *d2) { if (d1->length != d2->length) { /* Decryption can leave a little trailing cruft. @@ -144,7 +144,9 @@ main () } free(out.data); + free(out2.data); free(check.data); + free(check2.data); return 0; } diff --git a/src/lib/crypto/t_nfold.c b/src/lib/crypto/t_nfold.c index ae6a81be4..6be0a0934 100644 --- a/src/lib/crypto/t_nfold.c +++ b/src/lib/crypto/t_nfold.c @@ -97,7 +97,7 @@ static void rfc_tests () } } -static void fold_kerberos(int nbytes) +static void fold_kerberos(unsigned int nbytes) { unsigned char cipher_text[300]; int j; @@ -106,7 +106,7 @@ static void fold_kerberos(int nbytes) abort(); printf("%d-fold(\"kerberos\") =\n\t", nbytes*8); - krb5_nfold(64, "kerberos", 8*nbytes, cipher_text); + krb5_nfold(64, (unsigned char *) "kerberos", 8*nbytes, cipher_text); for (j=0; j