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
ceac1544
Commit
ceac1544
authored
Aug 28, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non-negative value
parent
0c27dd45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
libasn1fix/asn1fix_bitstring.c
libasn1fix/asn1fix_bitstring.c
+19
-0
tests/114-bit-string-SE.asn1
tests/114-bit-string-SE.asn1
+16
-0
No files found.
libasn1fix/asn1fix_bitstring.c
View file @
ceac1544
...
@@ -55,6 +55,25 @@ asn1f_fix_bit_string_type(arg_t *arg) {
...
@@ -55,6 +55,25 @@ asn1f_fix_bit_string_type(arg_t *arg) {
"is not an identifier"
,
v
->
_lineno
);
"is not an identifier"
,
v
->
_lineno
);
return
-
1
;
return
-
1
;
}
}
/* 21.1 */
if
(
v
->
value
==
NULL
)
{
FATAL
(
"BIT STRING NamedBit value at line %d "
"must be explicitly specified in braces"
,
v
->
_lineno
);
return
-
1
;
}
else
if
(
v
->
value
->
type
==
ATV_REFERENCED
)
{
/* Resolve the value */
if
(
asn1f_value_resolve
(
arg
,
v
,
0
))
return
-
1
;
}
if
(
v
->
value
->
type
!=
ATV_INTEGER
||
v
->
value
->
value
.
v_integer
<
0
)
{
FATAL
(
"BIT STRING NamedBit value at line %d: "
"non-negative integer value expected"
,
v
->
_lineno
);
return
-
1
;
}
}
}
return
r_value
;
return
r_value
;
...
...
tests/114-bit-string-SE.asn1
0 → 100644
View file @
ceac1544
-- SE: Semantic error
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .114
ModuleBitStringNegativeInteger
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 114 }
DEFINITIONS ::=
BEGIN
T ::= BIT STRING { 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