-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
string_decoderIssues and PRs related to the string_decoder subsystem.Issues and PRs related to the string_decoder subsystem.
Description
Version
node-v16.13.2
Platform
Linux astra 4.15.3-141-generic #astra26+ci17 x86_64 GNU/Linux (debian-based)
Subsystem
No response
What steps will reproduce the bug?
\\1
var StringDecoder = require('string_decoder').StringDecoder;
var d = new StringDecoder('utf8');
var b = Buffer('abc');
console.log(b);
console.log(d.__proto__.write(b));\\2
var StringDecoder = require('string_decoder').StringDecoder;
var d = new StringDecoder('utf8').__proto__;
var b = Buffer('abc');
console.log(b);
console.log(d.write(b));How often does it reproduce? Is there a required condition?
Standart buildCompiled with: gcc (version 8.3.0) ;
Configure params: --prefix="/target/dir";
Builded binary info:
node: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped.
What is the expected behavior?
No response
What do you see instead?
Stderr with run crafted sample: Abort;
<Buffer 61 62 63>
./node[7121]: ../src/node_buffer.cc:246:char *node::Buffer::Data(Local<v8::Value>): Assertion `val->IsArrayBufferView()' failed.
1: 0x10b84c7 node::DumpBacktrace(_IO_FILE*) [./node]
2: 0x17584a1 node::Abort() [./node]
3: 0x1756c1e [./node]
4: 0x15509af node::Buffer::Data(v8::Local<v8::Value>) [./node]
5: 0x213f228 [./node]
6: 0x2a7f008 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [./node]
7: 0x2a7e532 [./node]
8: 0x2a7d1ca v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [./node]
9: 0x3cb9299 [./node]
Аварийный остановAdditional information
Call might be what is causing in type proto (the last dot).
Metadata
Metadata
Assignees
Labels
string_decoderIssues and PRs related to the string_decoder subsystem.Issues and PRs related to the string_decoder subsystem.