We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1913a2c commit e12b8bfCopy full SHA for e12b8bf
internal/lowlevel/encryptor/mod.go
@@ -114,8 +114,8 @@ func (e *WorkwxEncryptor) prepareBufForEncryption(payload *WorkwxPayload) ([]byt
114
}
115
116
buf = buf[:cap(buf)] // grow to full capacity
117
- msglen := len(payload.Msg)
118
- if msglen < 0 || msglen > math.MaxUint32 {
+ msglen := uint64(len(payload.Msg))
+ if msglen > uint64(math.MaxUint32) {
119
return nil, errPayloadTooBig
120
121
binary.BigEndian.PutUint32(buf[16:], uint32(msglen))
0 commit comments