Fix bug with hash options in check mode
This commit is contained in:
parent
1ed169c25c
commit
0af74ce409
26
Fix-bug-with-hash-options-in-check-mode.patch
Normal file
26
Fix-bug-with-hash-options-in-check-mode.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 79a1a0b3d267893c40ac31192b20e20969a3a79c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aleksey <rhash.admin@gmail.com>
|
||||||
|
Date: Sun, 12 Dec 2021 16:27:55 +0300
|
||||||
|
Subject: [PATCH] Fix bug with hash options in --check mode
|
||||||
|
|
||||||
|
---
|
||||||
|
hash_check.c | 3 ++-
|
||||||
|
1 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/hash_check.c b/hash_check.c
|
||||||
|
index 4cffdc6..4d44d0d 100644
|
||||||
|
--- a/hash_check.c
|
||||||
|
+++ b/hash_check.c
|
||||||
|
@@ -1262,7 +1262,8 @@ static void set_parser_flags_by_file_extension(struct hash_parser_ext* parser)
|
||||||
|
struct file_ext ext;
|
||||||
|
if (!extract_uppercase_file_ext(&ext, parser->hash_file))
|
||||||
|
return;
|
||||||
|
- parser->expected_hash_mask = bsd_hash_name_to_id(ext.buffer, ext.length);
|
||||||
|
+ if (!parser->expected_hash_mask)
|
||||||
|
+ parser->expected_hash_mask = bsd_hash_name_to_id(ext.buffer, ext.length);
|
||||||
|
if (ext.length == 3 && memcmp(ext.buffer, "SFV", 3) == 0)
|
||||||
|
parser->is_sfv = 1;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,11 +1,14 @@
|
|||||||
Name: rhash
|
Name: rhash
|
||||||
Version: 1.4.2
|
Version: 1.4.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Great utility for computing hash sums
|
Summary: Great utility for computing hash sums
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/rhash/RHash
|
URL: https://github.com/rhash/RHash
|
||||||
Source0: https://github.com/rhash/RHash/archive/v%{version}/rhash-%{version}.tar.gz
|
Source0: https://github.com/rhash/RHash/archive/v%{version}/rhash-%{version}.tar.gz
|
||||||
|
|
||||||
|
#References: https://github.com/rhash/RHash/commit/79a1a0b3d267893c40ac31192b20e20969a3a79c
|
||||||
|
Patch0: Fix-bug-with-hash-options-in-check-mode.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -63,6 +66,9 @@ make test-shared
|
|||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/*.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 21 2022 zhangruifang <zhangruifang1@h-partners.com> - 1.4.2-2
|
||||||
|
- Fix bug with hash options in check mode
|
||||||
|
|
||||||
* Tue Nov 30 2021 zoulin <zoulin13@huawei.com> - 1.4.2-1
|
* Tue Nov 30 2021 zoulin <zoulin13@huawei.com> - 1.4.2-1
|
||||||
- Upgrade to 1.4.2
|
- Upgrade to 1.4.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user