projects
/
zchunk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d51cd8
)
Fix off by one error
author
Jonathan Dieter
<jdieter@gmail.com>
Tue, 17 Apr 2018 10:54:51 +0000
(13:54 +0300)
committer
Jonathan Dieter
<jdieter@gmail.com>
Tue, 17 Apr 2018 10:54:51 +0000
(13:54 +0300)
src/lib/io.c
patch
|
blob
|
history
diff --git
a/src/lib/io.c
b/src/lib/io.c
index cdca83b44ffa819daa3040ed389e7f6818053a6d..488ee19f75ea73f8e66ac1b0014f0a80c9020fda 100644
(file)
--- a/
src/lib/io.c
+++ b/
src/lib/io.c
@@
-78,7
+78,7
@@
int read_comp_size(int fd, size_t *val, size_t *length) {
int i=0;
for(char c=read_data(fd, data+i, 1); c < 128 && i < MAX_COMP_SIZE;
i++,c=read_data(fd, data+i, 1));
- if(i == MAX_COMP_SIZE
&& data[i] < 128
) {
+ if(i == MAX_COMP_SIZE) {
zck_log(ZCK_LOG_ERROR, "Number too large\n");
*val = 0;
return False;