[libbdplus-devel] Fix error check
anonymous
git at videolan.org
Thu Mar 16 11:41:17 CET 2017
libbdplus | branch: master | anonymous <anonymous at anonymous.org> | Thu Mar 16 11:53:54 2017 +0200| [97d6e917b0e74bc722d611e4f7c7dbc153172732] | committer: anonymous
Fix error check
> http://git.videolan.org/gitweb.cgi/libbdplus.git/?a=commit;h=97d6e917b0e74bc722d611e4f7c7dbc153172732
---
src/libbdplus/bdsvm/diff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libbdplus/bdsvm/diff.c b/src/libbdplus/bdsvm/diff.c
index 54e5f63..9def5b0 100644
--- a/src/libbdplus/bdsvm/diff.c
+++ b/src/libbdplus/bdsvm/diff.c
@@ -212,7 +212,7 @@ uint32_t diff_hashdb_load(uint8_t *hashname, uint8_t *fname, uint64_t offset,
sha_hdr.next - (uint32_t)sizeof(sha_hdr.len));
// Read in all digests, perhaps error checking?
- if (!fread(dst, sha_hdr.next - sizeof(sha_hdr.len), 1, fd)) {
+ if (fread(dst, sha_hdr.next - sizeof(sha_hdr.len), 1, fd) != 1) {
BD_DEBUG(DBG_BDPLUS,"[diff] Short read on hash_db.bin!\n");
}
// Update new len
More information about the libbdplus-devel
mailing list