mirror of https://github.com/v2ray/v2ray-core
fix buffer leak in crypto io
parent
4761139fbc
commit
d1e7e7002f
|
@ -51,6 +51,8 @@ func (w *CryptionWriter) Write(data []byte) (int, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *CryptionWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
func (w *CryptionWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||||
|
defer mb.Release()
|
||||||
|
|
||||||
bs := mb.ToNetBuffers()
|
bs := mb.ToNetBuffers()
|
||||||
for _, b := range bs {
|
for _, b := range bs {
|
||||||
w.stream.XORKeyStream(b, b)
|
w.stream.XORKeyStream(b, b)
|
||||||
|
|
Loading…
Reference in New Issue