Skip to content

Commit

Permalink
sizeof(digest) is incorrect. keiichi
Browse files Browse the repository at this point in the history
  • Loading branch information
itojun committed Jul 25, 2003
1 parent 5b658fc commit 0c14272
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kame/sys/crypto/hmac.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: hmac.c,v 1.5 2003/07/21 04:15:14 itojun Exp $ */
/* $KAME: hmac.c,v 1.6 2003/07/25 05:43:59 itojun Exp $ */

/*
* Copyright (C) 2002 WIDE Project. All rights reserved.
Expand Down Expand Up @@ -345,7 +345,8 @@ hmac_result(ctx, addr, l)
ctx->hash->loop(ctx, digest, ctx->hash->hash_resultlen);
ctx->hash->result(ctx, digest, ctx->hash->hash_resultlen);

bcopy(digest, (void *)addr, sizeof(digest) > l ? l : sizeof(digest));
bcopy(digest, (void *)addr,
ctx->hash->hash_resultlen > l ? l : sizeof(digest));

free(digest, M_TEMP);

Expand Down

0 comments on commit 0c14272

Please sign in to comment.