projects
/
zchunk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e075d5
)
Add a read error detection fix to the cppcheck patch.
author
Peter Pentchev
<roam@debian.org>
Sun, 22 Aug 2021 11:46:21 +0000
(14:46 +0300)
committer
Peter Pentchev
<roam@debian.org>
Sun, 22 Aug 2021 11:46:21 +0000
(14:46 +0300)
debian/patches/cppcheck.patch
patch
|
blob
|
history
diff --git
a/debian/patches/cppcheck.patch
b/debian/patches/cppcheck.patch
index f093eb7609897e73c54d2e3650b54f1b30fee0e9..8778dab40611894f116116a46853d01b1e5a5148 100644
(file)
--- a/
debian/patches/cppcheck.patch
+++ b/
debian/patches/cppcheck.patch
@@
-26,3
+26,20
@@
Last-Update: 2021-08-22
comp->cctx = ZSTD_createCCtx();
#ifndef OLD_ZSTD
+--- a/src/lib/io.c
++++ b/src/lib/io.c
+@@ -115,11 +115,13 @@
+ char *data = zmalloc(BUF_SIZE);
+
+ while((read_count = read(zck->temp_fd, data, BUF_SIZE)) > 0) {
+- if(read_count == -1 || !write_data(zck, zck->fd, data, read_count)) {
++ if(!write_data(zck, zck->fd, data, read_count)) {
+ free(data);
+ return false;
+ }
+ }
+ free(data);
++ if(read_count == -1)
++ return false;
+ return true;
+ }