2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-10 05:13:23 +00:00

ViewBitPlane.mjs: use byteLength instead of length to check validity of ArrayBuffer

This commit is contained in:
MikeCAT
2022-11-02 08:29:26 +09:00
parent ed8bd34915
commit 58b1fb8de5

View File

@@ -90,7 +90,7 @@ class ViewBitPlane extends Operation {
* @returns {html} * @returns {html}
*/ */
present(data) { present(data) {
if (!data.length) return ""; if (!data.byteLength) return "";
const type = isImage(data); const type = isImage(data);
return `<img src="data:${type};base64,${toBase64(data)}">`; return `<img src="data:${type};base64,${toBase64(data)}">`;