Skip to content

Commit

Permalink
test: remove buffer overflow test
Browse files Browse the repository at this point in the history
Removed test for overflowing buffers after changes in node_buffer.cc

Refs: https://github.com/ConorDavenport/node/blob/master/src/node_buffer.cc nodejs#31514
  • Loading branch information
DavenportEmma committed Feb 3, 2020
1 parent a60a104 commit 52b6882
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/parallel/test-buffer-fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const common = require('../common');
const assert = require('assert');
const { codes: { ERR_OUT_OF_RANGE } } = require('internal/errors');
const { internalBinding } = require('internal/test/binding');
const SIZE = 28;

const buf1 = Buffer.allocUnsafe(SIZE);
Expand Down Expand Up @@ -325,11 +324,6 @@ Buffer.alloc(8, '');
assert.strictEqual(buf.toString(), 'էէէէէ');
}

// Testing process.binding. Make sure "start" is properly checked for -1 wrap
// around.
assert.strictEqual(
internalBinding('buffer').fill(Buffer.alloc(1), 1, -1, 0, 1), -2);

// Make sure "end" is properly checked, even if it's magically mangled using
// Symbol.toPrimitive.
{
Expand All @@ -347,11 +341,6 @@ assert.strictEqual(
});
}

// Testing process.binding. Make sure "end" is properly checked for -1 wrap
// around.
assert.strictEqual(
internalBinding('buffer').fill(Buffer.alloc(1), 1, 1, -2, 1), -2);

// Test that bypassing 'length' won't cause an abort.
assert.throws(() => {
const buf = Buffer.from('w00t');
Expand Down

0 comments on commit 52b6882

Please sign in to comment.