aboutsummaryrefslogtreecommitdiff
path: root/src/checksum.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-01-27 16:31:12 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-01-27 16:31:12 -0500
commit38ef2cc6dff14f37050ea40ae62e4aea9863c805 (patch)
treecb8bc52c84650398f45186365341f29e7c7fde4e /src/checksum.c
parentb5919aefd1ca043ca26583f94721fb75c72ec9a4 (diff)
downloadspmc-38ef2cc6dff14f37050ea40ae62e4aea9863c805.tar.gz
Bug fixes:
* Fix buffer overflow issue with SHA256 buffer * Add missing origin to manifest * Fix missing manifest download
Diffstat (limited to 'src/checksum.c')
-rw-r--r--src/checksum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checksum.c b/src/checksum.c
index d511298..d2d0438 100644
--- a/src/checksum.c
+++ b/src/checksum.c
@@ -58,7 +58,7 @@ char *sha256sum(const char *filename) {
perror(filename);
return NULL;
}
- char *result = calloc((SHA256_DIGEST_LENGTH * 2) + 1, sizeof(char));
+ char *result = calloc(SHA256_DIGEST_STRING_LENGTH, sizeof(char));
if (!result) {
fclose(fp);
perror("SHA256 result");