1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

Fix incorrect buffer size used in cryptoHashOne().

This was missing when bufUsed() was introduced.

It is not currently a live issue, but becomes a problem in the new archive-push code where the entire buffer is not always used.
This commit is contained in:
David Steele 2019-03-16 12:21:16 +04:00
parent 9c1549585e
commit 0eb4c2c829
2 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,10 @@
<p>Add separate <cmd>archive-push-async</cmd> command.</p>
</release-item>
<release-item>
<p>Fix incorrect buffer size used in <code>cryptoHashOne()</code>.</p>
</release-item>
<release-item>
<p>Add <id>CIFS</id> storage driver.</p>
</release-item>

View File

@ -278,7 +278,7 @@ cryptoHashOne(const String *type, Buffer *message)
ASSERT(type != NULL);
ASSERT(message != NULL);
FUNCTION_TEST_RETURN(cryptoHashOneC(type, bufPtr(message), bufSize(message)));
FUNCTION_TEST_RETURN(cryptoHashOneC(type, bufPtr(message), bufUsed(message)));
}
/***********************************************************************************************************************************