aboutsummaryrefslogtreecommitdiff
path: root/javascript/olm_outbound_group_session.js
AgeCommit message (Collapse)Author
2016-12-16Avoid buffer overrun on encryptionRichard van der Hoff
Make sure we null-terminate encrypted strings before passing them to UTF8ToString. This used to work when we allocated the buffer on the stack, because it turns out that allocate() zeroinits the returned memory. malloc(), of course, does not.
2016-12-15zero out plaintext buffersRichard van der Hoff
Avoid leaving copies of the plaintext sitting around in the emscripten heap.
2016-12-14Allocate memory for message blobs on the heapRichard van der Hoff
Messages can be very large, so we don't really want to allocate them on the stack. Switch to using the heap for them, and try to clean up some of the string handling while we're at it.
2016-09-06Clean up some typosRichard van der Hoff
Remove redundant args from some js funcs, and fix a comment typo
2016-09-05Fix error handling for group sessionsRichard van der Hoff
Fix a couple of places where we were using the wrong method to get the last error.
2016-09-05Fix megolm decryption of UTF-8Richard van der Hoff
Repeat the fix from b10f90d for megolm messages. It turns out that the 'length' argument to 'Pointer_stringify' doesn't work if the input includes characters >= 128. Rather than try to figure out which methods can return UTF-8, and which always return plain ascii, replace all uses of Pointer_stringify with a 'length' argument with the version that expects a NULL-terminated input, and extend the buffer by a byte to allow space for a null-terminator. In the case of decrypt, we need to add the null ourself. Fixes https://github.com/vector-im/vector-web/issues/2078.
2016-05-25Javascript bindings for group sessionsRichard van der Hoff