net: fix for DialTimeout errors with large timeout
The existing implementation converts the deadline time to an int64, but does not handle overflow. If the calculated deadline is negative but the user specified deadline is in the future, then we can assume the calculation overflowed, and set the deadline to math.MaxInt64. Fixes #14431 Change-Id: I54dbb4f02bc7ffb9cae8cf62e4e967e9c6541ec6 Reviewed-on: https://go-review.googlesource.com/19758Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Showing
Please
register
or
sign in
to comment