Menu

zero-padded ber files: got [UNIVERSAL 0]

Help
2013-01-22
2013-03-19
  • leniviytorrent

    leniviytorrent - 2013-01-22

    File sizes for Erriccson MSC files are: 0, 2048, 4096, 6144, 8192, 10240, etc., that is divisible by 2048.
    The rest of the files is filled with zeros.
    PDU is "GSMPLMNCallDataRecord ::=  IMPLICIT SEQUENCE { … }"
    All the data is decoded successfully with converter-sample, but in the end the program prints:

    Decoding GSMPLMNCallDataRecord as SEQUENCE
    ber_check_tags(GSMPLMNCallDataRecord, size=423, tm=0, step=0, tagno=0)
    Fetching tag from {0084C731,423}: len 1, step 0, tagno 0 got [UNIVERSAL 0]
    Expected: [0], expectation failed (tn=0, tm=0)
    GSMPLMNCallDataRecord tagging check failed: 2
    Freeing GSMPLMNCallDataRecord as SEQUENCE
    Freeing GSMPLMNCallDataRecordChoice as CHOICE
    tests/in/test1.ber: Decode failed past byte 1625: Input processing error
    

    How to deal with it? Wiki says that  is "End Of Content". Shouldn't the parser treat it as EOF?

     
  • counselour

    counselour - 2013-01-22

    Those bytes are just padding so the ASN.1 messages are in 2k blocks. Just modify the converter-sample to pass '\0' bytes at the end of the message. eg,
    while (*bytes == 0 && bytes_left > 0)  { ++bytes; -bytes_left; }

     

Log in to post a comment.