Skip to content

Commit 5d59d98

Browse files
authored
Merge pull request #87 from chumvan/patch-1
Avoid overflow int for arm architecture
2 parents 7ab0cc5 + 4e5063b commit 5d59d98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/auth/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (auth *Authorization) CalcResponse(request sip.Request) *Authorization {
9999
ncHex := "00000000"
100100
auth.ncHex = ncHex[:len(ncHex)-len(hex)] + hex
101101
// Nc-value = 8LHEX. Max value = 'FFFFFFFF'.
102-
if auth.nc == 4294967296 {
102+
if temp_nc := int64(auth.nc); temp_nc == 4294967296 {
103103
auth.nc = 1
104104
auth.ncHex = "00000001"
105105
}

0 commit comments

Comments
 (0)