artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71d39bb
)
Don't fail in ober_scanf_elements() when encountering empty sequences.
author
gerhard
<gerhard@openbsd.org>
Tue, 22 Aug 2023 12:50:27 +0000
(12:50 +0000)
committer
gerhard
<gerhard@openbsd.org>
Tue, 22 Aug 2023 12:50:27 +0000
(12:50 +0000)
Ok martijn@
lib/libutil/ber.c
patch
|
blob
|
history
diff --git
a/lib/libutil/ber.c
b/lib/libutil/ber.c
index
3a19274
..
cd3bcd0
100644
(file)
--- a/
lib/libutil/ber.c
+++ b/
lib/libutil/ber.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: ber.c,v 1.2
4 2022/11/03 17:58:10 martijn
Exp $ */
+/* $OpenBSD: ber.c,v 1.2
5 2023/08/22 12:50:27 gerhard
Exp $ */
/*
* Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org>
@@
-797,7
+797,7
@@
ober_scanf_elements(struct ber_element *ber, char *fmt, ...)
if (ber->be_encoding != BER_TYPE_SEQUENCE &&
ber->be_encoding != BER_TYPE_SET)
goto fail;
- if (
ber->be_sub == NULL ||
level >= _MAX_SEQ-1)
+ if (level >= _MAX_SEQ-1)
goto fail;
parent[++level] = ber;
ber = ber->be_sub;