Merge pull request #4139 from matrix-org/travis/fix-qr-length

Ensure verification QR codes use the right buffer size
pull/21833/head
Travis Ralston 2020-02-26 13:28:41 -07:00 committed by GitHub
commit fe0bab7c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ export default class VerificationQRCode extends React.PureComponent {
buf = Buffer.concat([buf, tmpBuf]); buf = Buffer.concat([buf, tmpBuf]);
}; };
const appendInt = (i: number) => { const appendInt = (i: number) => {
const tmpBuf = Buffer.alloc(4); const tmpBuf = Buffer.alloc(2);
tmpBuf.writeInt8(i, 0); tmpBuf.writeInt8(i, 0);
buf = Buffer.concat([buf, tmpBuf]); buf = Buffer.concat([buf, tmpBuf]);
}; };