Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Out of bounds error #2

Open
tarik02 opened this issue Apr 21, 2017 · 4 comments
Open

Out of bounds error #2

tarik02 opened this issue Apr 21, 2017 · 4 comments

Comments

@tarik02
Copy link
Contributor

tarik02 commented Apr 21, 2017

I got error. Stack:

TypeError: "value" argument is out of bounds
    at checkInt (buffer.js:1039:11)
    at Buffer.writeInt16LE (buffer.js:1207:5)
    at Nonce.increment (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/nonce.js:30:21)
    at ServerCrypto.decrypt (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/crypto.js:67:31)
    at ServerCrypto.decryptPacket (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/server/crypto.js:43:38)
    at /home/tarik02/work/programming/clashroyale/node-cr-proxy/index.js:128:30
    at PacketReceiver.packetize (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/packetreceiver.js:29:21)
    at Socket.<anonymous> (/home/tarik02/work/programming/clashroyale/node-cr-proxy/index.js:118:34)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
@srabouin
Copy link
Contributor

Was the proxy running for a very long time / a lot of messages? I think at some point the nonce is too big.

@tarik02
Copy link
Contributor Author

tarik02 commented Apr 22, 2017

No, proxy was running for one-three minutes, there are not so many messages.
I think that solution is to add value = value % Int16Max.

@ghost
Copy link

ghost commented Jun 18, 2017

Which line does that occur on?

@tarik02
Copy link
Contributor Author

tarik02 commented Jun 18, 2017

@Batch-Monger, home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/nonce.js:30:21

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants