go-sdk icon indicating copy to clipboard operation
go-sdk copied to clipboard

分配一个大小为负数的[]byte,导致OOM

Open Ning-Qing opened this issue 2 years ago • 0 comments

https://github.com/FISCO-BCOS/go-sdk/blob/d1a8411d0e7600e2ece7c50c6da523ee52f32a45/conn/channel.go#L275

err := binary.Read(buf, binary.BigEndian, &result.length)
if err != nil {
	logrus.Println("binary.Read failed:", err)
}

请在这个位置进行检查或者返回

Ning-Qing avatar Aug 31 '22 03:08 Ning-Qing