]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/cache: verify that timestamp is positive
authorBryan C. Mills <bcmills@google.com>
Tue, 30 Jul 2019 18:51:26 +0000 (14:51 -0400)
committerBryan C. Mills <bcmills@google.com>
Tue, 30 Jul 2019 20:16:45 +0000 (20:16 +0000)
An apparent typo caused us to re-check size instead.

Updates #29667

Change-Id: Icc1fb9cef1ba77b8490c8fbe6c343be06ff48d8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/188020
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/cache/cache.go

index 168ad32b0edd17fe4645ff76c35907f82a257564..a05a08f75fcc3f0627f6a3357b929a30700a13f4 100644 (file)
@@ -173,7 +173,7 @@ func (c *Cache) get(id ActionID) (Entry, error) {
                i++
        }
        tm, err := strconv.ParseInt(string(etime[i:]), 10, 64)
-       if err != nil || size < 0 {
+       if err != nil || tm < 0 {
                return missing()
        }