File tree 2 files changed +19
-4
lines changed
internal/lowlevel/encryptor
2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 17
17
jobs :
18
18
19
19
build :
20
- runs-on : ubuntu-latest
21
20
strategy :
22
21
matrix :
23
- go : [ 'oldstable', 'stable' ]
22
+ include :
23
+ - go : ' oldstable'
24
+ goarch : amd64
25
+ runs-on : ubuntu-latest
26
+ - go : ' stable'
27
+ goarch : amd64
28
+ runs-on : ubuntu-latest
29
+ - go : ' stable'
30
+ goarch : ' 386'
31
+ runs-on : ubuntu-latest
32
+ - go : ' stable'
33
+ goarch : arm64
34
+ runs-on : ubuntu-24.04-arm
35
+ runs-on : ${{ matrix.runs-on }}
24
36
steps :
25
37
- uses : actions/checkout@v4
26
38
29
41
with :
30
42
go-version : ${{ matrix.go }}
31
43
44
+ - name : Set up GOARCH
45
+ run : export GOARCH="${{ matrix.goarch }}"
46
+
32
47
- name : Build
33
48
run : go build -v ./...
34
49
Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ func (e *WorkwxEncryptor) prepareBufForEncryption(payload *WorkwxPayload) ([]byt
114
114
}
115
115
116
116
buf = buf [:cap (buf )] // grow to full capacity
117
- msglen := len (payload .Msg )
118
- if msglen < 0 || msglen > math .MaxUint32 {
117
+ msglen := uint64 ( len (payload .Msg ) )
118
+ if msglen > uint64 ( math .MaxUint32 ) {
119
119
return nil , errPayloadTooBig
120
120
}
121
121
binary .BigEndian .PutUint32 (buf [16 :], uint32 (msglen ))
You can’t perform that action at this time.
0 commit comments