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
a0c9290c
Commit
a0c9290c
authored
Aug 28, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
identifier name clash
parent
ef4a32bd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
17 deletions
+37
-17
libasn1fix/asn1fix_bitstring.c
libasn1fix/asn1fix_bitstring.c
+14
-3
libasn1fix/asn1fix_enum.c
libasn1fix/asn1fix_enum.c
+1
-2
libasn1fix/asn1fix_integer.c
libasn1fix/asn1fix_integer.c
+5
-10
libasn1fix/asn1fix_misc.c
libasn1fix/asn1fix_misc.c
+1
-2
tests/113-bit-string-SE.asn1
tests/113-bit-string-SE.asn1
+16
-0
No files found.
libasn1fix/asn1fix_bitstring.c
View file @
a0c9290c
...
...
@@ -36,17 +36,28 @@ static int
asn1f_fix_bit_string_type
(
arg_t
*
arg
)
{
asn1p_expr_t
*
expr
=
arg
->
expr
;
asn1p_expr_t
*
v
;
int
r_value
=
0
;
int
ret
;
TQ_FOR
(
v
,
&
(
expr
->
members
),
next
)
{
/* Check identifier uniqueness as per 21.4 */
ret
=
asn1f_check_unique_expr_child
(
arg
,
v
,
0
);
RET2RVAL
(
ret
,
r_value
);
if
(
v
->
expr_type
==
A1TC_EXTENSIBLE
)
{
FATAL
(
"Extension marker (...) is not allowed "
"as a BIT STRING NamedBit at line %d "
,
v
->
_lineno
);
return
-
1
;
}
if
(
v
->
expr_type
!=
A1TC_UNIVERVAL
)
{
FATAL
(
"BIT STRING value at line %d "
"is not an identifier"
,
v
->
_lineno
);
"is not an identifier"
,
v
->
_lineno
);
return
-
1
;
}
}
return
0
;
return
r_value
;
}
static
int
...
...
libasn1fix/asn1fix_enum.c
View file @
a0c9290c
...
...
@@ -34,8 +34,7 @@ asn1f_fix_enum(arg_t *arg) {
*/
if
(
ev
->
expr_type
==
A1TC_EXTENSIBLE
)
{
if
(
ext_marker
)
{
arg
->
eh
(
1
,
"Enumeration %s at line %d: "
FATAL
(
"Enumeration %s at line %d: "
"Second extension marker is not allowed"
,
expr
->
Identifier
,
ev
->
_lineno
);
...
...
libasn1fix/asn1fix_integer.c
View file @
a0c9290c
...
...
@@ -38,20 +38,17 @@ asn1f_fix_integer(arg_t *arg) {
* Found "...", check correctness.
*/
if
(
iv
->
expr_type
==
A1TC_EXTENSIBLE
)
{
arg
->
eh
(
1
,
"INTEGER %s at line %d: "
FATAL
(
"INTEGER %s at line %d: "
"Extension marker is not allowed"
,
expr
->
Identifier
,
iv
->
_lineno
);
iv
->
_lineno
);
rvalue
=
-
1
;
continue
;
}
if
(
iv
->
Identifier
==
NULL
||
iv
->
expr_type
!=
A1TC_UNIVERVAL
)
{
arg
->
eh
(
1
,
"INTEGER %s at line %d: "
FATAL
(
"INTEGER %s at line %d: "
"Unsupported enumeration element %s"
,
expr
->
Identifier
,
iv
->
_lineno
,
...
...
@@ -62,8 +59,7 @@ asn1f_fix_integer(arg_t *arg) {
}
if
(
iv
->
value
==
NULL
)
{
arg
->
eh
(
1
,
"INTEGER %s at line %d: "
FATAL
(
"INTEGER %s at line %d: "
"Value for the identifier %s "
"must be set explicitly"
,
expr
->
Identifier
,
...
...
@@ -84,8 +80,7 @@ asn1f_fix_integer(arg_t *arg) {
}
if
(
iv
->
value
->
type
!=
ATV_INTEGER
)
{
arg
->
eh
(
1
,
"INTEGER %s at line %d: "
FATAL
(
"INTEGER %s at line %d: "
"Value for the identifier %s "
"is not compatible with INTEGER type"
,
expr
->
Identifier
,
...
...
libasn1fix/asn1fix_misc.c
View file @
a0c9290c
...
...
@@ -294,8 +294,7 @@ asn1f_check_unique_expr_child(arg_t *arg, asn1p_expr_t *child,
msg
=
opt_compare
?
"Expressions clash"
:
"Identifiers name clash"
;
arg
->
eh
(
1
,
"%s: "
FATAL
(
"%s: "
"
\"
%s
\"
at line %d has similar %s with "
"
\"
%s
\"
at line %d"
,
msg
,
...
...
tests/113-bit-string-SE.asn1
0 → 100644
View file @
a0c9290c
-- SE: Semantic error
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .113
ModuleBitStringExtensibility
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 113 }
DEFINITIONS ::=
BEGIN
T ::= BIT STRING { one(1), one(2) }
END
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