From fcceb72e9d342833a97225230dd2115b63397ac0 Mon Sep 17 00:00:00 2001 From: Subhadeep Date: Mon, 15 Jun 2026 16:25:10 +0530 Subject: [PATCH] Add blocksize validation in XORChecksum run method Added validation check for blocksize parameter in run method. --- src/core/operations/XORChecksum.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/operations/XORChecksum.mjs b/src/core/operations/XORChecksum.mjs index b5160281..ca9c6fac 100644 --- a/src/core/operations/XORChecksum.mjs +++ b/src/core/operations/XORChecksum.mjs @@ -43,7 +43,7 @@ class XORChecksum extends Operation { run(input, args) { const blocksize = args[0]; - // 2. Added validation check + if (!Number.isInteger(blocksize) || blocksize <= 0) { throw new OperationError("Blocksize must be a positive integer."); }