1
0
mirror of https://github.com/golang/go synced 2024-11-16 22:14:45 -07:00

cmd/go/internal/cache: verify that timestamp is positive

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>
This commit is contained in:
Bryan C. Mills 2019-07-30 14:51:26 -04:00
parent 2fc7574aab
commit 5f8d8161e6

View 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()
}