mirror of https://github.com/lukechilds/node.git
Browse Source
The EncIn, EncOut, ClearIn & ClearOut functions are victims of some code
copy + pasting. A common line copied to all of them is:
`if (off >= buffer_length) { ...`
448e0f43
corrected ClearIn's check from `>=` to `>`, but left the others
unchanged (with an incorrect bounds check). However, if you look down at
the next very next bounds check you'll see:
`if (off + len > buffer_length) { ...`
So the check is actually obviated by the next line, and should be
removed.
This fixes an issue where writing a zero-length buffer to an encrypted
pair's *encrypted* stream you would get a crash.
v0.11.0-release
Marcel Laverdet
12 years ago
committed by
Fedor Indutny
1 changed files with 0 additions and 20 deletions
Loading…
Reference in new issue