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
454ea2cd
Commit
454ea2cd
authored
Aug 15, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oops; fixed
parent
7a080483
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
ChangeLog
ChangeLog
+1
-0
asn1c/check-xxber.sh
asn1c/check-xxber.sh
+9
-3
asn1c/unber.c
asn1c/unber.c
+3
-2
No files found.
ChangeLog
View file @
454ea2cd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
* Made unber(1) program more verbose: effective structure length is
* Made unber(1) program more verbose: effective structure length is
now displayed as L="<n>" at the closing tag. (Test check-xxber.sh).
now displayed as L="<n>" at the closing tag. (Test check-xxber.sh).
* Fixed unber(1)'s -1 switch for indefinite encoding length.
* Fixed unber(1)'s -1 switch for indefinite encoding length.
* New command line option for unber(1): -m to enable minimalistic mode.
0.9.17: 2005-Aug-07
0.9.17: 2005-Aug-07
...
...
asn1c/check-xxber.sh
View file @
454ea2cd
...
@@ -10,9 +10,15 @@ diff -u . . 2>/dev/null && diffArgs="$diffArgs -u" # Unified diff output
...
@@ -10,9 +10,15 @@ diff -u . . 2>/dev/null && diffArgs="$diffArgs -u" # Unified diff output
cat
<<
EOM
>
$ORIG
cat
<<
EOM
>
$ORIG
<I O="0" T="[UNIVERSAL 16]" TL="2" V="Indefinite" A="SEQUENCE">
<I O="0" T="[UNIVERSAL 16]" TL="2" V="Indefinite" A="SEQUENCE">
<P O="2" T="[UNIVERSAL 19]" TL="2" V="2" A="PrintableString">US</P>
<P O="2" T="[UNIVERSAL 19]" TL="2" V="2" A="PrintableString">US</P>
<C O="6" T="[UNIVERSAL 16]" TL="2" V="
6
" A="SEQUENCE">
<C O="6" T="[UNIVERSAL 16]" TL="2" V="
22
" A="SEQUENCE">
<P O="8" T="[UNIVERSAL 2]" TL="2" V="4" A="INTEGER">1¦ G</P>
<P O="8" T="[UNIVERSAL 2]" TL="2" V="4" A="INTEGER">1¦ G</P>
</C O="14" T="[UNIVERSAL 16]" A="SEQUENCE" L="8">
<C O="14" T="[UNIVERSAL 16]" TL="2" V="6" A="SEQUENCE">
<P O="16" T="[UNIVERSAL 2]" TL="2" V="4" A="INTEGER">1¦ G</P>
</C O="22" T="[UNIVERSAL 16]" A="SEQUENCE" L="8">
<C O="22" T="[UNIVERSAL 16]" TL="2" V="6" A="SEQUENCE">
<P O="24" T="[UNIVERSAL 2]" TL="2" V="4" A="INTEGER">1¦ G</P>
</C O="30" T="[UNIVERSAL 16]" A="SEQUENCE" L="8">
</C O="30" T="[UNIVERSAL 16]" A="SEQUENCE" L="24">
EOM
EOM
./enber
$ORIG
| ./unber
-p
-i
0 -
>
$TEST
2>&1
./enber
$ORIG
| ./unber
-p
-i
0 -
>
$TEST
2>&1
...
@@ -25,7 +31,7 @@ if [ "$diffExitCode" = "0" ]; then
...
@@ -25,7 +31,7 @@ if [ "$diffExitCode" = "0" ]; then
fi
fi
# Append necessary terminator
# Append necessary terminator
echo
'</I O="
14" T="[UNIVERSAL 0]" TL="2" L="16
">'
>>
$ORIG
echo
'</I O="
30" T="[UNIVERSAL 0]" TL="2" L="32
">'
>>
$ORIG
# Try trancoding again
# Try trancoding again
./enber
$ORIG
| ./unber
-p
-i
0 -
>
$TEST
2>&1
./enber
$ORIG
| ./unber
-p
-i
0 -
>
$TEST
2>&1
...
...
asn1c/unber.c
View file @
454ea2cd
...
@@ -202,11 +202,11 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
...
@@ -202,11 +202,11 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
pd_code_e
pdc
=
PD_FINISHED
;
pd_code_e
pdc
=
PD_FINISHED
;
ber_tlv_tag_t
tlv_tag
;
ber_tlv_tag_t
tlv_tag
;
ber_tlv_len_t
tlv_len
;
ber_tlv_len_t
tlv_len
;
ber_tlv_len_t
local_esize
=
effective_size
;
ssize_t
t_len
;
ssize_t
t_len
;
ssize_t
l_len
;
ssize_t
l_len
;
do
{
do
{
ber_tlv_len_t
local_esize
=
0
;
int
constr
;
int
constr
;
int
ch
;
int
ch
;
...
@@ -295,6 +295,8 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
...
@@ -295,6 +295,8 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
*
offset
+=
t_len
+
l_len
;
*
offset
+=
t_len
+
l_len
;
*
frame_size
+=
t_len
+
l_len
;
*
frame_size
+=
t_len
+
l_len
;
effective_size
+=
t_len
+
l_len
;
effective_size
+=
t_len
+
l_len
;
printf
(
"LES %d + %d + %d
\n
"
,
(
int
)
local_esize
,
(
int
)
t_len
,
(
int
)
l_len
);
local_esize
+=
t_len
+
l_len
;
local_esize
+=
t_len
+
l_len
;
if
(
expect_eoc
&&
tagbuf
[
0
]
==
'\0'
&&
tagbuf
[
1
]
==
'\0'
)
{
if
(
expect_eoc
&&
tagbuf
[
0
]
==
'\0'
&&
tagbuf
[
1
]
==
'\0'
)
{
...
@@ -346,7 +348,6 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
...
@@ -346,7 +348,6 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
print_TL
(
1
,
*
offset
,
level
,
constr
,
tblen
,
print_TL
(
1
,
*
offset
,
level
,
constr
,
tblen
,
tlv_tag
,
tlv_len
,
local_esize
);
tlv_tag
,
tlv_len
,
local_esize
);
local_esize
=
0
;
tblen
=
0
;
tblen
=
0
;
}
while
(
1
);
}
while
(
1
);
...
...
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