From 347f56b983ec515720d9a576fa55ef4f2950bcc7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 26 Feb 2020 13:21:11 -0700 Subject: [PATCH] Ensure verification QR codes use the right buffer size The string length buffer only needs 2 bytes, not 4. --- src/components/views/elements/crypto/VerificationQRCode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/crypto/VerificationQRCode.js b/src/components/views/elements/crypto/VerificationQRCode.js index 88f9608138..b7232048e5 100644 --- a/src/components/views/elements/crypto/VerificationQRCode.js +++ b/src/components/views/elements/crypto/VerificationQRCode.js @@ -126,7 +126,7 @@ export default class VerificationQRCode extends React.PureComponent { buf = Buffer.concat([buf, tmpBuf]); }; const appendInt = (i: number) => { - const tmpBuf = Buffer.alloc(4); + const tmpBuf = Buffer.alloc(2); tmpBuf.writeInt8(i, 0); buf = Buffer.concat([buf, tmpBuf]); };