Guard against large reads

This is a fix for #26348
This commit is contained in:
Cecylia Bocovich 2019-05-10 15:36:04 -04:00
parent 5380aaca8c
commit ce3101d016
3 changed files with 5 additions and 5 deletions

View file

@ -91,7 +91,7 @@ func (bc *BrokerChannel) Negotiate(offer *webrtc.SessionDescription) (
switch resp.StatusCode {
case http.StatusOK:
body, err := ioutil.ReadAll(resp.Body)
body, err := ioutil.ReadAll(http.MaxBytesReader(nil, resp.Body, 100000))
if nil != err {
return nil, err
}