Skip to content

Commit 630ee8b

Browse files
authored
crypto: add null check to BIOPointer::New() (#35)
1 parent c569580 commit 630ee8b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ncrypto.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ BIOPointer BIOPointer::NewSecMem() {
15151515
}
15161516

15171517
BIOPointer BIOPointer::New(const BIO_METHOD* method) {
1518+
if (method == nullptr) return {};
15181519
return BIOPointer(BIO_new(method));
15191520
}
15201521

0 commit comments

Comments
 (0)