+2001-12-05 Ezra Peisach <epeisach@mit.edu>
+
+ * yarrow.c (krb5int_yarrow_stretch): Delare local variable unsigned.
+ (krb5int_yarrow_init): Zero cipher context on init.
+
+ * yhash.h (HASH_Final): Use a variable other than out (shadow in
+ yarrow.c)
+
2001-11-21 Sam Hartman <hartmans@mit.edu>
* yarrow.c (Yarrow_detect_fork): Reseed the number generator including the fork rather than throwing away state.
mem_zero(y->K, sizeof(y->K));
+ mem_zero(&y->cipher, sizeof(y->cipher));
+
TRY (krb5int_yarrow_cipher_init(&y->cipher, y->K));
y->out_left = 0;
y->out_count = 0;
EXCEP_DECL;
const byte* s_i;
byte* outp;
- int left, use;
+ int left;
+ unsigned int use;
HASH_CTX hash, save;
byte digest[HASH_DIGEST_SIZE];
#define HASH_Update(x, buf, sz) shsUpdate(x, (const void*)buf, sz)
#define HASH_Final(x, tdigest) do { \
int loopvar; \
- unsigned char *out = (void *)(tdigest); \
+ unsigned char *out2 = (void *)(tdigest); \
HASH_CTX *ctx = (x); \
shsFinal(ctx); \
for (loopvar=0; loopvar<(sizeof(ctx->digest)/sizeof(ctx->digest[0])); loopvar++) { \
- out[loopvar*4] = (ctx->digest[loopvar]>>24)&0xff; \
- out[loopvar*4+1] = (ctx->digest[loopvar]>>16)&0xff; \
- out[loopvar*4+2] = (ctx->digest[loopvar]>>8)&0xff; \
- out[loopvar*4+3] = ctx->digest[loopvar]&0xff; \
+ out2[loopvar*4] = (ctx->digest[loopvar]>>24)&0xff; \
+ out2[loopvar*4+1] = (ctx->digest[loopvar]>>16)&0xff; \
+ out2[loopvar*4+2] = (ctx->digest[loopvar]>>8)&0xff; \
+ out2[loopvar*4+3] = ctx->digest[loopvar]&0xff; \
} \
} while(0)