sframe icon indicating copy to clipboard operation
sframe copied to clipboard

RangeError: offset is out of bounds

Open ggoldens opened this issue 3 years ago • 3 comments

When fixing the issue commented in https://github.com/medooze/sframe/issues/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 avatar Nov 29 '21 16:11 ggoldens

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

ggoldens avatar Nov 29 '21 20:11 ggoldens

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

murillo128 avatar Nov 29 '21 20:11 murillo128

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

ggoldens avatar Nov 30 '21 02:11 ggoldens