projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use @va_arg@ as an argument to @STORE32@!
[u/mdw/catacomb]
/
sha.c
diff --git
a/sha.c
b/sha.c
index
2fe1846
..
918e6d3
100644
(file)
--- a/
sha.c
+++ b/
sha.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: sha.c,v 1.
2 1999/12/10 23:20:0
3 mdw Exp $
+ * $Id: sha.c,v 1.
3 2000/06/17 11:31:4
3 mdw Exp $
*
* Implementation of the SHA-1 hash function
*
*
* Implementation of the SHA-1 hash function
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: sha.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: sha.c,v $
+ * Revision 1.3 2000/06/17 11:31:43 mdw
+ * Portability fix for broken compilers.
+ *
* Revision 1.2 1999/12/10 23:20:03 mdw
* New hash interface requirements.
*
* Revision 1.2 1999/12/10 23:20:03 mdw
* New hash interface requirements.
*
@@
-240,7
+243,7
@@
void sha_set(sha_ctx *ctx, const void *buf, unsigned long count)
ctx->e = LOAD32(p + 16);
ctx->off = 0;
ctx->nl = U32(count);
ctx->e = LOAD32(p + 16);
ctx->off = 0;
ctx->nl = U32(count);
- ctx->nh = U32((
count
>> 16) >> 16);
+ ctx->nh = U32((
(count & ~MASK32)
>> 16) >> 16);
}
/* --- @sha_hash@ --- *
}
/* --- @sha_hash@ --- *