Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42d74e0

Browse files
committed
Fix copy-paste error with SHA256 digest length in checksum_helper.c
Issue introduced by87ae969, noticed while working on the area. Whileon it, fix some grammar in the surrounding static assertions.
1 parent69273c8 commit42d74e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/common/checksum_helper.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ pg_checksum_final(pg_checksum_context *context, uint8 *output)
180180
StaticAssertStmt(sizeof(pg_crc32c) <=PG_CHECKSUM_MAX_LENGTH,
181181
"CRC-32C digest too big for PG_CHECKSUM_MAX_LENGTH");
182182
StaticAssertStmt(PG_SHA224_DIGEST_LENGTH <=PG_CHECKSUM_MAX_LENGTH,
183-
"SHA224 digest too for PG_CHECKSUM_MAX_LENGTH");
183+
"SHA224 digest toobigfor PG_CHECKSUM_MAX_LENGTH");
184184
StaticAssertStmt(PG_SHA256_DIGEST_LENGTH <=PG_CHECKSUM_MAX_LENGTH,
185-
"SHA256 digest too for PG_CHECKSUM_MAX_LENGTH");
185+
"SHA256 digest toobigfor PG_CHECKSUM_MAX_LENGTH");
186186
StaticAssertStmt(PG_SHA384_DIGEST_LENGTH <=PG_CHECKSUM_MAX_LENGTH,
187-
"SHA384 digest too for PG_CHECKSUM_MAX_LENGTH");
187+
"SHA384 digest toobigfor PG_CHECKSUM_MAX_LENGTH");
188188
StaticAssertStmt(PG_SHA512_DIGEST_LENGTH <=PG_CHECKSUM_MAX_LENGTH,
189-
"SHA512 digest too for PG_CHECKSUM_MAX_LENGTH");
189+
"SHA512 digest toobigfor PG_CHECKSUM_MAX_LENGTH");
190190

191191
switch (context->type)
192192
{
@@ -207,7 +207,7 @@ pg_checksum_final(pg_checksum_context *context, uint8 *output)
207207
if (pg_cryptohash_final(context->raw_context.c_sha2,output)<0)
208208
return-1;
209209
pg_cryptohash_free(context->raw_context.c_sha2);
210-
retval=PG_SHA224_DIGEST_LENGTH;
210+
retval=PG_SHA256_DIGEST_LENGTH;
211211
break;
212212
caseCHECKSUM_TYPE_SHA384:
213213
if (pg_cryptohash_final(context->raw_context.c_sha2,output)<0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp