check stream index when parse block

This commit is contained in:
nareix 2016-06-11 09:27:19 +08:00
parent e9a3828572
commit f4d9ad60ac

View File

@ -562,6 +562,10 @@ func (self *Client) parseBlock(blockNo int, packet []byte) (streamIndex int, err
}
streamIndex = blockNo/2
if streamIndex >= len(self.streams) {
err = fmt.Errorf("rtsp: parseBlock: streamIndex=%d invalid", streamIndex)
return
}
stream := self.streams[streamIndex]
/*