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
7c9e9237
Commit
7c9e9237
authored
Oct 02, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed limits accounting
parent
28c89eb4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
asn1c/asn1c.1
asn1c/asn1c.1
+4
-2
asn1c/asn1c.c
asn1c/asn1c.c
+1
-1
asn1c/unber.c
asn1c/unber.c
+11
-2
No files found.
asn1c/asn1c.1
View file @
7c9e9237
...
...
@@ -80,7 +80,7 @@ an ASN.1 standard and compiler may fail to produce the meaningful code.
.TP
.B \-fnative-types
Use the native machine's data types (int, double) whenever possible,
instead of the compound
ASN.1
INTEGER_t, ENUMERATED_t and REAL_t types.
instead of the compound INTEGER_t, ENUMERATED_t and REAL_t types.
.TP
.B \-fno-constraints
Do not generate ASN.1 subtype constraint checking code. This may make a shorter executable.
...
...
@@ -89,7 +89,9 @@ Do not generate ASN.1 subtype constraint checking code. This may make a shorter
Enable unnamed unions in the definitions of target language's structures.
.TP
.B \-ftypes88
Use only ASN.1:1988 embedded types.
Pretend to support only ASN.1:1988 embedded types. Certain reserved words,
such as UniversalString and BMPString, become ordinary type references
and may be redefined by the specification.
.SH OUTPUT OPTIONS
.TP
.B \-print-constraints
...
...
asn1c/asn1c.c
View file @
7c9e9237
...
...
@@ -313,7 +313,7 @@ usage(const char *av0) {
" -fnative-types Use
\"
int
\"
instead of INTEGER_t whenever possible
\n
"
" -fno-constraints Do not generate constraint checking code
\n
"
" -funnamed-unions Enable unnamed unions in structures
\n
"
" -ftypes88
Use
only ASN.1:1988 embedded types
\n
"
" -ftypes88
Pretend to support
only ASN.1:1988 embedded types
\n
"
"
\n
"
" -print-constraints Explain subtype constraints (debug)
\n
"
...
...
asn1c/unber.c
View file @
7c9e9237
...
...
@@ -301,11 +301,17 @@ static pd_code_e process_deeper(const char *fname, FILE *fp, int level, ssize_t
* This is a constructed type. Process recursively.
*/
printf
(
">
\n
"
);
/* Close the opening tag */
if
(
tlv_len
!=
-
1
&&
limit
!=
-
1
)
{
assert
(
limit
>=
tlv_len
);
}
pdc
=
process_deeper
(
fname
,
fp
,
level
+
1
,
tlv_len
==
-
1
?
limit
:
tlv_len
,
&
dec
,
tlv_len
==
-
1
);
if
(
pdc
==
PD_FAILED
)
return
pdc
;
if
(
limit
!=
-
1
)
limit
-=
dec
;
if
(
limit
!=
-
1
)
{
assert
(
limit
>=
dec
);
limit
-=
dec
;
}
*
decoded
+=
dec
;
if
(
tlv_len
==
-
1
)
{
tblen
=
0
;
...
...
@@ -316,7 +322,10 @@ static pd_code_e process_deeper(const char *fname, FILE *fp, int level, ssize_t
if
(
print_V
(
fname
,
fp
,
tlv_tag
,
tlv_len
))
return
PD_FAILED
;
if
(
limit
!=
-
1
)
{
assert
(
limit
>=
tlv_len
);
limit
-=
tlv_len
;
}
*
decoded
+=
tlv_len
;
}
...
...
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