Commit 454ea2cd authored by Lev Walkin's avatar Lev Walkin

oops; fixed

parent 7a080483
......@@ -11,6 +11,7 @@
* Made unber(1) program more verbose: effective structure length is
now displayed as L="<n>" at the closing tag. (Test check-xxber.sh).
* 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
......
......@@ -10,9 +10,15 @@ diff -u . . 2>/dev/null && diffArgs="$diffArgs -u" # Unified diff output
cat<<EOM > $ORIG
<I O="0" T="[UNIVERSAL 16]" TL="2" V="Indefinite" A="SEQUENCE">
<P O="2" T="[UNIVERSAL 19]" TL="2" V="2" A="PrintableString">&#x55;&#x53;</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">&#x31;&#xa6;&#x20;&#x47;</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">&#x31;&#xa6;&#x20;&#x47;</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">&#x31;&#xa6;&#x20;&#x47;</P>
</C O="30" T="[UNIVERSAL 16]" A="SEQUENCE" L="8">
</C O="30" T="[UNIVERSAL 16]" A="SEQUENCE" L="24">
EOM
./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1
......@@ -25,7 +31,7 @@ if [ "$diffExitCode" = "0" ]; then
fi
# 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
./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1
......
......@@ -202,11 +202,11 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
pd_code_e pdc = PD_FINISHED;
ber_tlv_tag_t tlv_tag;
ber_tlv_len_t tlv_len;
ber_tlv_len_t local_esize = effective_size;
ssize_t t_len;
ssize_t l_len;
do {
ber_tlv_len_t local_esize = 0;
int constr;
int ch;
......@@ -295,6 +295,8 @@ process_deeper(const char *fname, FILE *fp, asn1c_integer_t *offset, int level,
*offset += t_len + l_len;
*frame_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;
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,
print_TL(1, *offset, level, constr, tblen,
tlv_tag, tlv_len, local_esize);
local_esize = 0;
tblen = 0;
} while(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment