mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
http2: fix underflow in http2 server push
After CL 534215 was merged to fix a CVE it introduced an underflow when we try to decrement sc.curHandlers in handlerDone. There is one place that calls runHandler without incrementing curHandlers. Seems to only affect http.Pusher. For golang/go#63511
This commit is contained in:
@@ -3187,6 +3187,7 @@ func (sc *serverConn) startPush(msg *startPushRequest) {
|
||||
panic(fmt.Sprintf("newWriterAndRequestNoBody(%+v): %v", msg.url, err))
|
||||
}
|
||||
|
||||
sc.curHandlers++
|
||||
go sc.runHandler(rw, req, sc.handler.ServeHTTP)
|
||||
return promisedID, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user