[ARVADOS] updated: 783a6278efb607b201df2781942a0b1c6a385929
git at public.curoverse.com
git at public.curoverse.com
Tue Sep 22 12:02:25 EDT 2015
Summary of changes:
services/keepstore/volume_unix.go | 7 +++++++
1 file changed, 7 insertions(+)
via 783a6278efb607b201df2781942a0b1c6a385929 (commit)
from 7a029b844a155d7b90ccfbf4b81f80c886770591 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 783a6278efb607b201df2781942a0b1c6a385929
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Sep 22 12:01:25 2015 -0400
7329: Fix infinite loop in Compare when reading an empty file.
refs #7329
diff --git a/services/keepstore/volume_unix.go b/services/keepstore/volume_unix.go
index afae279..6c0f5c4 100644
--- a/services/keepstore/volume_unix.go
+++ b/services/keepstore/volume_unix.go
@@ -122,6 +122,13 @@ func (v *UnixVolume) Compare(loc string, expect []byte) error {
bufLen := 1 << 20
if int64(bufLen) > stat.Size() {
bufLen = int(stat.Size())
+ if bufLen < 1 {
+ // len(buf)==0 would prevent us from handling
+ // empty files the same way as non-empty
+ // files, because reading 0 bytes at a time
+ // never reaches EOF.
+ bufLen = 1
+ }
}
cmp := expect
buf := make([]byte, bufLen)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list