From 6eb35ad3892be91af74923b94490d9cc3e119f0e Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 26 Nov 2022 23:05:22 +0000 Subject: [PATCH] Missing return value check for BIO_new() --- usr.sbin/rpki-client/geofeed.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rpki-client/geofeed.c b/usr.sbin/rpki-client/geofeed.c index bf8eef12a71..e4a86dac8b7 100644 --- a/usr.sbin/rpki-client/geofeed.c +++ b/usr.sbin/rpki-client/geofeed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: geofeed.c,v 1.4 2022/11/26 17:06:43 job Exp $ */ +/* $OpenBSD: geofeed.c,v 1.5 2022/11/26 23:05:22 tb Exp $ */ /* * Copyright (c) 2022 Job Snijders * Copyright (c) 2019 Kristaps Dzonsons @@ -113,6 +113,8 @@ geofeed_parse(X509 **x509, const char *fn, char *buf, size_t len) int rc = 0; bio = BIO_new(BIO_s_mem()); + if (bio == NULL) + errx(1, "BIO_new"); memset(&p, 0, sizeof(struct parse)); p.fn = fn; -- 2.20.1