diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2022-01-30 13:27:40 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2022-01-30 13:27:40 +0000 |
commit | 4eac109d59f1573a30795ce8002b99c35ba01ed1 (patch) | |
tree | 6e19aea8c8e76f287c0a1f41ea27c38040718dcb /usr.sbin | |
parent | cd294a4eb3a9e7b2a9165113fcb3f5a1d427a213 (diff) |
Add missing NULL check.
OK benno@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/snmpd/application.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/application.c b/usr.sbin/snmpd/application.c index f9421922610..00659f04246 100644 --- a/usr.sbin/snmpd/application.c +++ b/usr.sbin/snmpd/application.c @@ -1,4 +1,4 @@ -/* $OpenBSD: application.c,v 1.1 2022/01/19 10:59:35 martijn Exp $ */ +/* $OpenBSD: application.c,v 1.2 2022/01/30 13:27:39 martijn Exp $ */ /* * Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org> @@ -1056,7 +1056,8 @@ appl_response(struct appl_backend *backend, int32_t requestid, appl_varbind_error(origvb, error); origvb->avi_state = APPL_VBSTATE_DONE; origvb->avi_varbind.av_oid = vb->av_oid; - if (vb->av_value->be_class == BER_CLASS_CONTEXT && + if (vb->av_value != NULL && + vb->av_value->be_class == BER_CLASS_CONTEXT && vb->av_value->be_type == APPL_EXC_ENDOFMIBVIEW) { nregion = appl_region_next(ureq->aru_ctx, &(vb->av_oid), origvb->avi_region); |