summaryrefslogtreecommitdiff
path: root/src/hash/sha1/collisiondetect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash/sha1/collisiondetect.c')
-rw-r--r--src/hash/sha1/collisiondetect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash/sha1/collisiondetect.c b/src/hash/sha1/collisiondetect.c
index e6a126780..722ebf36f 100644
--- a/src/hash/sha1/collisiondetect.c
+++ b/src/hash/sha1/collisiondetect.c
@@ -24,21 +24,21 @@ void git_hash_sha1_ctx_cleanup(git_hash_sha1_ctx *ctx)
int git_hash_sha1_init(git_hash_sha1_ctx *ctx)
{
- assert(ctx);
+ GIT_ASSERT_ARG(ctx);
SHA1DCInit(&ctx->c);
return 0;
}
int git_hash_sha1_update(git_hash_sha1_ctx *ctx, const void *data, size_t len)
{
- assert(ctx);
+ GIT_ASSERT_ARG(ctx);
SHA1DCUpdate(&ctx->c, data, len);
return 0;
}
int git_hash_sha1_final(git_oid *out, git_hash_sha1_ctx *ctx)
{
- assert(ctx);
+ GIT_ASSERT_ARG(ctx);
if (SHA1DCFinal(out->id, &ctx->c)) {
git_error_set(GIT_ERROR_SHA1, "SHA1 collision attack detected");
return -1;