Skip to content

Commit 33728cb

Browse files
wooffietargos
authored andcommitted
src: add nullptr checks in StreamPipe::New
Fixes: #57612 PR-URL: #57613 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: theanarkh <[email protected]>
1 parent cff3725 commit 33728cb

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)