diff options
author | Richard van der Hoff <richard@matrix.org> | 2016-07-05 23:01:23 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2016-07-06 22:32:51 +0100 |
commit | 939aa747dd64bdfb3b2138ffccd4792c18f6ab91 (patch) | |
tree | fe3d70e7a7d25bdd732ccb079ab1e1729e4fbc40 /src/megolm.c | |
parent | c8d00665b37af44e1c62b56407ed8e2e84fee830 (diff) |
JS: make sure returned strings are null-terminated
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/1719.
Diffstat (limited to 'src/megolm.c')
0 files changed, 0 insertions, 0 deletions