"value" argument is out of bounds
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- cryptography
Research direction
Start with the update function linked in ghash.js at line 112, then trace the reported call through browserify-aes/aes.js and modes/cbc.js to buffer's checkInt. Reproduce the error using the data passed to Encrypt.js, and determine whether the package or the input causes the out-of-bounds value; done means the cause and handling are documented or verified.
Written by the indexing model from the issue text.
Description
Hiya, been seeing this infrequent error in production (10 times in the last 3 months)
"value" argument is out of bounds
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
if (offset + ext > buf.length) throw new RangeError('Index out of range')
}
Looks like it's coming from the update function.
/static/node_modules/buffer/index.js:1259:40:in `unknown'
/static/node_modules/buffer/index.js:1369:17:in `checkInt'
/static/node_modules/browserify-aes/aes.js:198:6:in `writeUInt32BE'
/static/node_modules/browserify-aes/modes/cbc.js:6:28:in `encryptBlock'
/static/node_modules/browserify-aes/encrypter.js:29:23:in `encrypt'
/static/node_modules/cipher-base/index.js:28:21:in `_update'
/static/js/components/home/Encrypt.js:25:24:in `update' <---- 👋
/static/js/components/home/Encrypt.js:48:41:in `encryptParams'
/static/node_modules/react-dom/cjs/react-dom.production.min.js:187:187:in `render'
/static/node_modules/react-dom/cjs/react-dom.production.min.js:186:172:in `qi'
Is this something we can get the package to handle, or is it to do with the data I'm feeding in?
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from browserify/browserify-aes
-
Difficulty 3/5 1-2 days Newbie friendliness 20/100
browserify/browserify-aes#66 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
browserify/browserify-aes#61 · 1 comment ·
-
RangeError in authCipher.jsMay be free again @calvinmetcalf claimed this 2865 days ago, and no pull request is open. Open
browserify/browserify-aes#58 · 4 comments · 1 assignee ·
-
Incompatible with buffer-xor 2Possibly taken @kt3k claimed this 1685 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
browserify/browserify-aes#52 · 2 comments ·
-
License violationMay be free again @bastien-roucaries claimed this 3323 days ago, and no pull request is open. Openquestion
browserify/browserify-aes#43 · 10 comments · 1 reaction · 1 assignee ·
All issues in browserify/browserify-aes
Similar issues
-
area/frontend good first issue kind/cooldown
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kestra-io/kestra#20702 · 1 comment ·
Maintainers usually reply within 1 day
-
Form-data fields are not parsed when importing a cURL requestPossibly taken @aayushbaluni claimed this today. Openbug status-new
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day
-
bug MVP
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
saayam-for-all/webapp#1911 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vshulcz/deja-vu#4937 · 2 comments ·
Maintainers usually reply within 1 day
-
[Focus] Accessibility (a11y) [Package] Grid [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day