Skip to content

fix: validate hexdump width upper bound#2514

Open
skyswordw wants to merge 1 commit into
gchq:masterfrom
skyswordw:fix-hexdump-width-validation
Open

fix: validate hexdump width upper bound#2514
skyswordw wants to merge 1 commit into
gchq:masterfrom
skyswordw:fix-hexdump-width-validation

Conversation

@skyswordw

Copy link
Copy Markdown

Summary

Why

A very large width value can reach String.padEnd() and throw an uncaught RangeError before CyberChef can present a normal operation error. Validating the width keeps the operation failure user-facing and bounded.

Fixes #2483.

Checks

  • npm ci
  • npm run lint
  • npm test
  • focused Hexdump operation test (13 passing)
  • git diff --check

@CLAassistant

CLAassistant commented Jun 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@skyswordw skyswordw marked this pull request as ready for review June 6, 2026 10:33
@skyswordw

Copy link
Copy Markdown
Author

CLA is signed now, so I am marking this ready for review.

Local checks completed before opening the PR:

  • npm ci
  • focused Hexdump operation tests (13 passing)
  • direct oversized-width smoke check
  • focused ESLint on src/core/operations/ToHexdump.mjs and tests/operations/tests/Hexdump.mjs
  • full npm run lint
  • full npm test (245 Node API tests and 1961 operation tests passing)
  • git diff --check

@skyswordw skyswordw force-pushed the fix-hexdump-width-validation branch from bc65a40 to b50bb88 Compare June 6, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug(To Hexdump): Uncaugh range error when Width a large number

2 participants