aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHubert Chathi <[email protected]>2018-06-28 17:03:46 -0400
committerHubert Chathi <[email protected]>2018-06-28 17:03:46 -0400
commit3ed0ec226cfd90392c925c7b44d34b6e2c5d1535 (patch)
treeb87f2a071a28f8c64d7336a44be15707b5477e60
parentb91c77721deb3f9150a7f8498925b9866f539505 (diff)
downloadolm-3ed0ec226cfd90392c925c7b44d34b6e2c5d1535.zip
olm-3ed0ec226cfd90392c925c7b44d34b6e2c5d1535.tar.gz
olm-3ed0ec226cfd90392c925c7b44d34b6e2c5d1535.tar.bz2
add termination
-rw-r--r--javascript/olm_pk.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/javascript/olm_pk.js b/javascript/olm_pk.js
index 700139d..580d854 100644
--- a/javascript/olm_pk.js
+++ b/javascript/olm_pk.js
@@ -126,7 +126,7 @@ PkDecryption.prototype['generate_key'] = restore_stack(function () {
var pubkey_length = pk_encryption_method(
Module['_olm_pk_key_length']
)();
- var pubkey_buffer = stack(pubkey_length);
+ var pubkey_buffer = stack(pubkey_length + NULL_BYTE_PADDING_LENGTH);
pk_decryption_method(Module['_olm_pk_generate_key'])(
this.ptr,
pubkey_buffer, pubkey_length,