summaryrefslogtreecommitdiff
path: root/prism.c
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2014-01-07 20:27:07 -0500
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2014-01-07 20:27:07 -0500
commitffe739eeb12d1bf9dadb2144e95fef79820c6844 (patch)
tree71bc466fa3d8be3c2d3c197388c49a2a3dda3907 /prism.c
parentbe58b862309fabfae996b94c441bf778b09df463 (diff)
downloadprism-ffe739eeb12d1bf9dadb2144e95fef79820c6844.tar.gz
prism-ffe739eeb12d1bf9dadb2144e95fef79820c6844.zip
Fixed possible unterminated strings in hash handling in commit code.
Diffstat (limited to 'prism.c')
-rw-r--r--prism.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/prism.c b/prism.c
index bd18ae9..7d19cb8 100644
--- a/prism.c
+++ b/prism.c
@@ -56,7 +56,7 @@ static void init_task()
static void add_task(const char *filename)
{
-char new_hash[33];
+char new_hash[HASH_BYTES];
int res;
struct db_file oldfile;
@@ -130,9 +130,9 @@ int res;
static void hash_task(const char *filename)
{
int res;
-char hash[33];
+char hash[HASH_BYTES];
- memset(hash, 0, 33);
+ memset(hash, 0, HASH_BYTES);
printf("Computing hash for %s...\n", filename);
res = get_file_hash(filename, hash);