Skip to content

Commit a8f381a

Browse files
wooffieaduh95
authored andcommitted
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 parent 409c66d commit a8f381a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stream_pipe.cc

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

Comments
 (0)