◐ Shell
clean mode source ↗

src: add nullptr checks in `StreamPipe::New` · nodejs/node@33728cb

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 33728cb

wooffietargos

authored and

committed

src: add nullptr checks in StreamPipe::New

Fixes: #57612 PR-URL: #57613 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: theanarkh <theratliter@gmail.com>

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -278,6 +278,8 @@ void StreamPipe::New(const FunctionCallbackInfo<Value>& args) {

278278

CHECK(args[1]->IsObject());

279279

StreamBase* source = StreamBase::FromObject(args[0].As<Object>());

280280

StreamBase* sink = StreamBase::FromObject(args[1].As<Object>());

281+

CHECK_NOT_NULL(source);

282+

CHECK_NOT_NULL(sink);

281283
282284

if (StreamPipe::New(source, sink, args.This()).IsNothing()) return;

283285

}

0 commit comments