Skip to content

Commit 0123b91

Browse files
committed
allocation may fail. CID #1643157
1 parent 81947f6 commit 0123b91

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/protocols/der/decode.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,10 @@ static ssize_t fr_der_decode_sequence(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_d
926926
*/
927927
if (unlikely(flags->sequence_of == FR_DER_TAG_CHOICE)) {
928928
child = fr_dict_attr_child_by_num(parent, current_tag);
929-
if (!child) child = fr_dict_attr_unknown_raw_afrom_num(decode_ctx->tmp_ctx, parent, current_tag);
929+
if (!child) {
930+
child = fr_dict_attr_unknown_raw_afrom_num(decode_ctx->tmp_ctx, parent, current_tag);
931+
if (!child) return -1;
932+
}
930933
}
931934

932935
FR_PROTO_TRACE("decode context %s -> %s", parent->name, child->name);

0 commit comments

Comments
 (0)