Skip to content

Validate To Binary byte length#2486

Open
puneetdixit200 wants to merge 1 commit into
gchq:masterfrom
puneetdixit200:fix/to-binary-byte-length-validation
Open

Validate To Binary byte length#2486
puneetdixit200 wants to merge 1 commit into
gchq:masterfrom
puneetdixit200:fix/to-binary-byte-length-validation

Conversation

@puneetdixit200

Copy link
Copy Markdown

Fixes #2484

Summary

  • validate To Binary padding before calling padStart
  • add min/max metadata for the Byte Length argument
  • add To Binary regression coverage for oversized byte length input

Tests

  • npm_config_cache=/tmp/cyberchef-2484-npm-cache npx grunt configTests
  • node --no-warnings --no-deprecation --openssl-legacy-provider --input-type=module -e 'import "./tests/operations/tests/ToBinary.mjs"; import "./tests/operations/tests/BitwiseOp.mjs"; import "./tests/operations/tests/ParityBit.mjs"; import TestRegister from "./tests/lib/TestRegister.mjs"; const results = await TestRegister.runTests(); console.log(JSON.stringify(results.map(({test,status,output}) => ({name: test.name, status, output})), null, 2)); if (results.some((result) => result.status !== "passing")) process.exit(1);'\n- node --no-warnings --no-deprecation --openssl-legacy-provider --trace-uncaught tests/operations/index.mjs\n- npm_config_cache=/tmp/cyberchef-2484-npm-cache npx grunt lint\n- git diff --check

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Deepak kudi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug(To Binary): Uncaugh range error when Byte Length a large number

3 participants