Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
06230f79
Commit
06230f79
authored
Jun 26, 2007
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoding unknown extensions
parent
70e3d264
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
7 deletions
+37
-7
skeletons/constr_SEQUENCE.c
skeletons/constr_SEQUENCE.c
+37
-7
No files found.
skeletons/constr_SEQUENCE.c
View file @
06230f79
...
@@ -1210,10 +1210,33 @@ uper_get_open_type(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
...
@@ -1210,10 +1210,33 @@ uper_get_open_type(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
return
rv
;
return
rv
;
}
}
asn_dec_rval_t
uper_sot_suck
(
asn_codec_ctx_t
*
opt_codec_ctx
,
asn_TYPE_descriptor_t
*
td
,
asn_per_constraints_t
*
constraints
,
void
**
sptr
,
asn_per_data_t
*
pd
)
{
asn_dec_rval_t
rv
;
(
void
)
opt_codec_ctx
;
(
void
)
td
;
(
void
)
constraints
;
(
void
)
sptr
;
while
(
per_get_few_bits
(
pd
,
24
)
>=
0
);
rv
.
code
=
RC_OK
;
rv
.
consumed
=
pd
->
moved
;
return
rv
;
}
static
int
static
int
uper_skip_open_type
(
asn_codec_ctx_t
*
opt_codec_ctx
,
asn_per_data_t
*
pd
)
{
uper_skip_open_type
(
asn_codec_ctx_t
*
opt_codec_ctx
,
asn_per_data_t
*
pd
)
{
asn_TYPE_descriptor_t
s_td
;
asn_dec_rval_t
rv
;
asn_dec_rval_t
rv
;
rv
=
uper_get_open_type
(
opt_codec_ctx
,
0
,
0
,
0
,
pd
);
s_td
.
name
=
"<unknown extension>"
;
s_td
.
uper_decoder
=
uper_sot_suck
;
rv
=
uper_get_open_type
(
opt_codec_ctx
,
&
s_td
,
0
,
0
,
pd
);
if
(
rv
.
code
!=
RC_OK
)
if
(
rv
.
code
!=
RC_OK
)
return
-
1
;
return
-
1
;
else
else
...
@@ -1387,12 +1410,18 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
...
@@ -1387,12 +1410,18 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
/* Skip over overflow extensions which aren't present
/* Skip over overflow extensions which aren't present
* in this system's version of the protocol */
* in this system's version of the protocol */
while
(
per_get_few_bits
(
&
epmd
,
1
)
>=
0
)
{
for
(;;)
{
switch
(
per_get_few_bits
(
&
epmd
,
1
))
{
case
-
1
:
break
;
case
0
:
continue
;
default:
if
(
uper_skip_open_type
(
opt_codec_ctx
,
pd
))
{
if
(
uper_skip_open_type
(
opt_codec_ctx
,
pd
))
{
FREEMEM
(
epres
);
FREEMEM
(
epres
);
_ASN_DECODE_STARVED
;
_ASN_DECODE_STARVED
;
}
}
}
}
break
;
}
FREEMEM
(
epres
);
FREEMEM
(
epres
);
}
}
...
@@ -1445,7 +1474,7 @@ SEQUENCE_handle_extensions(asn_TYPE_descriptor_t *td, void *sptr,
...
@@ -1445,7 +1474,7 @@ SEQUENCE_handle_extensions(asn_TYPE_descriptor_t *td, void *sptr,
int
present
;
int
present
;
if
(
!
IN_EXTENSION_GROUP
(
specs
,
edx
))
{
if
(
!
IN_EXTENSION_GROUP
(
specs
,
edx
))
{
ASN_DEBUG
(
"%
d is not extension"
,
edx
);
ASN_DEBUG
(
"%
s (@%d) is not extension"
,
elm
->
type
->
name
,
edx
);
continue
;
continue
;
}
}
...
@@ -1459,7 +1488,8 @@ SEQUENCE_handle_extensions(asn_TYPE_descriptor_t *td, void *sptr,
...
@@ -1459,7 +1488,8 @@ SEQUENCE_handle_extensions(asn_TYPE_descriptor_t *td, void *sptr,
present
=
1
;
present
=
1
;
}
}
ASN_DEBUG
(
"checking ext %d is present => %d"
,
edx
,
present
);
ASN_DEBUG
(
"checking %s (@%d) present => %d"
,
elm
->
type
->
name
,
edx
,
present
);
exts_count
++
;
exts_count
++
;
exts_present
+=
present
;
exts_present
+=
present
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment