Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not forget to allocate the memory for the output of the blake2b sum
Baptiste Daroussin committed 10 years ago
commit efeb81b620ea0ab6b18686324edf20b50d24b0bb
parent 0cc4163
1 file changed +1 -0
modified libpkg/pkg_checksum.c
@@ -433,6 +433,7 @@ pkg_checksum_hash_blake2_file(int fd, unsigned char **out, size_t *outlen)
	while ((r = read(fd, buffer, sizeof(buffer))) > 0)
		blake2b_update(&st, buffer, r);

+
	*out = malloc(BLAKE2B_OUTBYTES);
	blake2b_final(&st, *out, BLAKE2B_OUTBYTES);
	*outlen = BLAKE2B_OUTBYTES;
}