Skip to content

Commit 8c70f5e

Browse files
committed
fix sha1 integer overflow problem lipp#31
1 parent a74815c commit 8c70f5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/websocket/tools.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ local sha1 = function(msg)
105105
h3 = band(h3,0xffffffff)
106106
h4 = band(h4,0xffffffff)
107107

108-
return spack('>I>I>I>I>I',h0,h1,h2,h3,h4)
108+
return spack('>i>i>i>i>i',h0,h1,h2,h3,h4)
109109
end
110110

111111
local base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'

0 commit comments

Comments
 (0)