diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2021-11-19 21:16:26 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2021-11-19 21:16:26 +0000 |
commit | b55ff7c57658e695ea97c7fdfca6d98688c65533 (patch) | |
tree | c768f91a585039dcbd738314d2050265c707d2ea /sbin | |
parent | 7b61083405d39c5e28aa0b50e08303b0a40cf8f2 (diff) |
Check stdrup() return value.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/ocsp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/iked/ocsp.c b/sbin/iked/ocsp.c index 6c8898aa199..06d77af3996 100644 --- a/sbin/iked/ocsp.c +++ b/sbin/iked/ocsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp.c,v 1.21 2020/12/22 21:01:55 tobhe Exp $ */ +/* $OpenBSD: ocsp.c,v 1.22 2021/11/19 21:16:25 tobhe Exp $ */ /* * Copyright (c) 2014 Markus Friedl @@ -149,6 +149,10 @@ ocsp_connect(struct iked *env, struct imsg *imsg) oc->oc_sh = sh; oc->oc_path = path; oc->oc_url = strdup(url); + if (oc->oc_url == NULL) { + log_warn("%s: strdup failed", SPI_SH(&sh, __func__)); + goto done; + } path = NULL; log_debug("%s: connect(%s, %s)", __func__, host, port); |