mirror of https://gerrit.osmocom.org/asn1c
Fix crash during dealing with empty optinal fields of ioc cell
This commit is contained in:
parent
aeff717baf
commit
069c07657e
|
@ -1070,6 +1070,8 @@ asn1c_lang_C_OpenType(arg_t *arg, asn1c_ioc_table_and_objset_t *opt_ioc,
|
|||
struct asn1p_ioc_cell_s *cell =
|
||||
&opt_ioc->ioct->row[row]->column[column_index];
|
||||
|
||||
if(!cell->value) continue;
|
||||
|
||||
asn1p_expr_t *m = asn1p_expr_clone(cell->value, 0);
|
||||
asn1p_expr_add(open_type_choice, m);
|
||||
}
|
||||
|
|
|
@ -213,7 +213,9 @@ static int
|
|||
emit_ioc_cell(arg_t *arg, struct asn1p_ioc_cell_s *cell) {
|
||||
OUT("{ \"%s\", ", cell->field->Identifier);
|
||||
|
||||
if(cell->value->meta_type == AMT_VALUE) {
|
||||
if(!cell->value) {
|
||||
/* Ignore */
|
||||
} else if(cell->value->meta_type == AMT_VALUE) {
|
||||
GEN_INCLUDE(asn1c_type_name(arg, cell->value, TNF_INCLUDE));
|
||||
OUT("aioc__value, ");
|
||||
OUT("&asn_DEF_%s, ", asn1c_type_name(arg, cell->value, TNF_SAFE));
|
||||
|
|
Loading…
Reference in New Issue