diff options
author | Bi-Ruei, Chiu <biruei.chiu@gmail.com> | 2017-10-19 00:41:15 +0800 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2017-10-20 17:15:57 -0700 |
commit | 3e2de6960b88402e7f974146a0045cdf443270d4 (patch) | |
tree | 8926d9c68b339c60150bcbb038832a64c502fc7c /libasn1fix | |
parent | 214c4919511534a4484c9f099999e9c5ccef0204 (diff) |
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 },
...
}
Diffstat (limited to 'libasn1fix')
-rw-r--r-- | libasn1fix/asn1fix_cws.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libasn1fix/asn1fix_cws.c b/libasn1fix/asn1fix_cws.c index d2be70d9..948c6277 100644 --- a/libasn1fix/asn1fix_cws.c +++ b/libasn1fix/asn1fix_cws.c @@ -1,3 +1,5 @@ +#include <stdio.h> +#include <stdlib.h> #include "asn1fix_internal.h" #include "asn1fix_cws.h" @@ -195,6 +197,8 @@ _asn1f_foreach_unparsed(arg_t *arg, const asn1p_constraint_t *ct, return _asn1f_foreach_unparsed_union(ct, process, keyp); case ACT_CA_CSV: /* , */ break; + case ACT_EL_VALUE: + return 0; } 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, /* This value 100 should be larger than following formatting string */ psize = bend - buf + 100; - pp = malloc(psize); + pp = calloc(1, psize); if(pp == NULL) { free(mivr); return -1; |