[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#375470: marked as done (Decoding routines generated by snacc expect extra EOC octets in a tagged CHOICE)



Your message dated Thu, 28 Nov 2024 18:19:57 +0000
with message-id <[🔎] E1tGj7N-00HRYV-3h@fasolo.debian.org>
and subject line Bug#1085565: Removed package(s) from unstable
has caused the Debian Bug report #375470,
regarding Decoding routines generated by snacc expect extra EOC octets in a tagged CHOICE
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
375470: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=375470
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: snacc
Version: 1.3bbn-9
Severity: important



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages snacc depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  libsnacc0c2                   1.3bbn-9   ASN.1 to C or C++ or IDL compiler,

Versions of packages snacc recommends:
ii  libsnacc-dev                  1.3bbn-9   ASN.1 to C or C++ or IDL compiler,
pn  snacc-doc                     <none>     (no description available)


I found this bug when using snacc to generate the decoding routines for
TAP 3.11 (Transfer Account Procedure Data Record Format, Specification
Version Number 3. GSM Association, Official Document TD.57, 26 May 2005)
and testing them with data files from an external source that are surely
of this particular format. The routines returned an unexpected error:

BDecEoc: ERROR - non zero byte in EOC or end of data reached

The same files could be handled without errors by dumpasn1.

It wasn't easy to find out from where these errors come. I inserted
printf() calls adjacent to the BDecEoc() calls in the generated decoding
routines, and this way I finally found that:

The decoding routines expect (and check the presence of) two consecutive
EOC octets where only one EOC octet is present in my test files (no,
I cannot provide you with them). After deleting the extra code the
files went through decoding without errors.

I haven't had the same kind of problem with earlier versions of TAP 3,
so I searched for an explanation from the changes made in TAP 3
specifications from TAP 3.10 to TAP 3.11, and found that the extra
EOC was expected in the decoding routine at a tagged CHOICE, which
was non-tagged in earlier TAP 3 specifications.

The following is a simplified excerpt of the TAP 3.11 specification:


TAP-0311  DEFINITIONS IMPLICIT TAGS  ::=

BEGIN

BasicService ::= [APPLICATION 36] SEQUENCE
{
    serviceCode                 BasicServiceCode            OPTIONAL,
    transparencyIndicator       INTEGER                     OPTIONAL
}

BasicServiceCode ::= [APPLICATION 426] CHOICE
{
    teleServiceCode             TeleServiceCode,
    bearerServiceCode           BearerServiceCode
}

BearerServiceCode ::= [APPLICATION 40] HexString --(SIZE(2))

TeleServiceCode ::= [APPLICATION 218] HexString	--(SIZE(2))

HexString ::= OCTET STRING

END


Compile this by snacc. You can find the following sequence of code
in the generated function BDecBasicServiceContent():


    BDecBasicServiceCodeContent (b, tagId2, elmtLen2, (v->serviceCode),
    &totalElmtsLen1, env);
    if (elmtLen1 == INDEFINITE_LEN)
        BDecEoc(b, &totalElmtsLen1, env);
    if (elmtLen1 == INDEFINITE_LEN)
        BDecEoc (b, &totalElmtsLen1, env);


One of the if sentences with its BDecEoc() call is too much, it
shouldn't be there!

I haven't checked if the coding functions produce output that is
compatible with the decoding functions (with extra EOC) or if they
are OK.


--- End Message ---
--- Begin Message ---
Version: 1.3.1-10+rm

Dear submitter,

as the package snacc has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1085565

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)

--- End Message ---

Reply to: