projects
/
zchunk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74dfa5d
)
Fix error where we don't check for hash_type < 0
author
Jonathan Dieter
<jdieter@gmail.com>
Wed, 6 Jun 2018 10:23:04 +0000
(13:23 +0300)
committer
Jonathan Dieter
<jdieter@gmail.com>
Wed, 6 Jun 2018 10:23:04 +0000
(13:23 +0300)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
src/lib/hash/hash.c
patch
|
blob
|
history
diff --git
a/src/lib/hash/hash.c
b/src/lib/hash/hash.c
index 29f5560801e6b070be12db0151510388463d4d3c..de9277fa2949d51bbc60a72d4cc01ed90dcdb5f9 100644
(file)
--- a/
src/lib/hash/hash.c
+++ b/
src/lib/hash/hash.c
@@
-409,7
+409,7
@@
int PUBLIC zck_validate_data_checksum(zckCtx *zck) {
}
const char PUBLIC *zck_hash_name_from_type(int hash_type) {
- if(hash_type > 1) {
+ if(hash_type > 1
|| hash_type < 0
) {
snprintf(unknown+8, 21, "%i)", hash_type);
return unknown;
}