1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 23:47:07 -05:00

fix buffer leak in crypto io

This commit is contained in:
Darien Raymond 2017-11-07 11:39:54 +01:00
parent 4761139fbc
commit d1e7e7002f
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -51,6 +51,8 @@ func (w *CryptionWriter) Write(data []byte) (int, error) {
}
func (w *CryptionWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
defer mb.Release()
bs := mb.ToNetBuffers()
for _, b := range bs {
w.stream.XORKeyStream(b, b)