]> Cypherpunks repositories - gostls13.git/commit
net/http: fix possible nil pointer dereference in TestOnlyWriteTimeout
authorMikio Hara <mikioh.mikioh@gmail.com>
Thu, 9 Feb 2017 21:22:39 +0000 (06:22 +0900)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 22 Mar 2017 17:04:05 +0000 (17:04 +0000)
commitb029e943448c2ddf6faa9007a8ba4ab76238f18b
tree133d3330f200aef4e569f8abb061b5cbac6f77ac
parent0b4e8d00fe6267550e7e11149f6cd992e6edd04d
net/http: fix possible nil pointer dereference in TestOnlyWriteTimeout

TestOnlyWriteTimeout assumes wrongly that:
- the Accept method of trackLastConnListener is called only once
- the shared variable conn never becomes nil
and crashes on some circumstances.

Updates #19032.

Change-Id: I61de22618cd90b84a2b6401afdb6e5d9b3336b12
Reviewed-on: https://go-review.googlesource.com/36735
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/serve_test.go