Wireshark-bugs: [Wireshark-bugs] [Bug 3597] Implicit octet string that is constructed causes PRE

Date: Tue, 30 Jun 2009 17:38:39 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3597





--- Comment #3 from Fred Gruman <fgruman@xxxxxxxxx>  2009-06-30 17:38:36 PDT ---
Hello Graeme,

Thanks for the proposed patch.  The patch looks good to me and I tested it
against other FTAM files and they dissected ok.

I noticed you made changes to dissect_ber_octet_string to retrieve the last pc
indication. Given this changes, I thought it would be possible to call
dissect_ber_octet_string directly from dissect_pres_T_octet_aligned and avoid
having to export reassemble_octet_string.  Further, dissect_ber_octet_string
will retrieve the last pc indication so get_last_ber_identifier does not need
to be called from dissect_pres_T_octet_aligned.

I also updated your change in dissect_ber_octet_string to handle the following
scenario:  When the implicit data has indefinite length, the caller may send a
new tvb buffer that contains only the data with the end-of-content octets
removed.  I check the length of the buffer vs the length from the outer
tag/length (retrieved from get_last_ber_length).  If buffer length = last
length - 2, then I assume a new tvb buffer was sent and adjust the length and
set ind=FALSE.  If this is not done, then the data does not dissect correctly.

I also updated pres.cnf in asn1/pres which can be used to build packet-pres.c.

Although get_last_ber_identifier and get_last_ber_length are not referenced
outside packet-ber.c with these changes, I did not change the export of these
functions in case a future routine has use of these functions.

Let me know what you think.

Thanks, Fred


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.