2
0
mirror of https://github.com/gchq/CyberChef synced 2026-02-28 02:23:17 +00:00

Fix return of buffer for PNG QR image generation - resolves #2124 (#2125)

Co-authored-by: GCHQ Developer 85297 <95289555+C85297@users.noreply.github.com>
This commit is contained in:
GCHQDeveloper581
2026-02-20 16:07:37 +00:00
committed by GitHub
parent c97baa6fdf
commit 8df8028f43
3 changed files with 69 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ export function generateQrCode(
case "PDF":
return Utils.strToArrayBuffer(qrImage);
case "PNG":
return qrImage.buffer;
return qrImage.buffer.slice(qrImage.byteOffset, qrImage.byteLength + qrImage.byteOffset);
default:
throw new OperationError("Unsupported QR code format.");
}