More robust integer comparison
This commit is contained in:
parent
f6fe9c307d
commit
87c4ac8efb
@ -126,7 +126,7 @@ type Stream interface {
|
||||
}
|
||||
|
||||
func encodeMessageB(writer io.Writer, sizeLimit int64, method uint16, data []byte) error {
|
||||
if len(data) > int(sizeLimit) {
|
||||
if int64(len(data)) > sizeLimit {
|
||||
return ErrPayloadTooLarge
|
||||
}
|
||||
buffer := make([]byte, 10 + len(data))
|
||||
|
Loading…
Reference in New Issue
Block a user