You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Ensure verification QR codes use the right buffer size
The string length buffer only needs 2 bytes, not 4.
This commit is contained in:
@@ -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]);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user