Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

RangeError: offset is out of bounds #15

Open
ggoldens opened this issue Nov 29, 2021 · 3 comments
Open

RangeError: offset is out of bounds #15

ggoldens opened this issue Nov 29, 2021 · 3 comments

Comments

@ggoldens
Copy link
Contributor

When fixing the issue commented in #13, I see another error:

RangeError: offset is out of bounds
at Uint8Array.set (<anonymous>)
at Sender.encrypt (Sender.js:94)
at async TaskQueue.run (Worker.js:34)

This points to https://github.com/medooze/sframe/blob/master/lib/Sender.js#L94
Seems that the error is in the calculation of ini. Do you have any suggestion, @murillo128? thanks!!!!

@ggoldens
Copy link
Contributor Author

@murillo128 FYI this issue plus the issue #13 is breaking the example :(

@murillo128
Copy link
Member

can you check what are the values of each of this variables?

let ini = skip + encryptedFrame.byteLength - extraBytes;
``
also, one thing to note is that signing has been removed from the sframe spec, so I will remove this code anyway when I implement the latest draft

@ggoldens
Copy link
Contributor Author

ohh that is interesting. If the latest spec removes authentication, then we can just ignore all of these issues :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants