Sync the SHA256 code with NetBSD HEAD.
This fixes a buffer overflow and avoids unnecessary casts and other cleanup thorough the code. --HG-- extra : convert_revision : 4b389251cfb76b28028967cd60c409fe94f6c85e
This commit is contained in:
@@ -46,7 +46,7 @@ xbps_get_file_hash(const char *file)
|
||||
{
|
||||
SHA256_CTX ctx;
|
||||
char *hash;
|
||||
uint8_t buf[BUFSIZ * 20], digest[SHA256_DIGEST_LENGTH * 2 + 1];
|
||||
uint8_t buf[BUFSIZ * 20], digest[SHA256_DIGEST_STRING_LENGTH];
|
||||
ssize_t bytes;
|
||||
int fd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user