Skip to content

Commit 3e2de69

Browse files
brchiuvlm
authored andcommitted
Solve the problem that information object table with one entry can not be properly handled
E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSetupItemBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupItemBearerSUReq PRESENCE mandatory }, ... } result in 'FATAL: Information Object Set E-RABToBeSetupItemBearerSUReqIEs contains no objects at line xxxx' If it contains more than one entry then there is no problem. E-RABSetupRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| { ID id-E-RABToBeSetupListBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupListBearerSUReq PRESENCE mandatory }, ... }
1 parent 214c491 commit 3e2de69

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libasn1fix/asn1fix_cws.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
13
#include "asn1fix_internal.h"
24
#include "asn1fix_cws.h"
35

@@ -195,6 +197,8 @@ _asn1f_foreach_unparsed(arg_t *arg, const asn1p_constraint_t *ct,
195197
return _asn1f_foreach_unparsed_union(ct, process, keyp);
196198
case ACT_CA_CSV: /* , */
197199
break;
200+
case ACT_EL_VALUE:
201+
return 0;
198202
}
199203

200204
for(size_t i = 0; i < ct->el_count; i++) {
@@ -407,7 +411,7 @@ _asn1f_assign_cell_value(arg_t *arg, struct asn1p_ioc_cell_s *cell,
407411

408412
/* This value 100 should be larger than following formatting string */
409413
psize = bend - buf + 100;
410-
pp = malloc(psize);
414+
pp = calloc(1, psize);
411415
if(pp == NULL) {
412416
free(mivr);
413417
return -1;

0 commit comments

Comments
 (0)