Wireshark-bugs: [Wireshark-bugs] [Bug 3597] Implicit octet string that is constructed causes PRE
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3597
--- Comment #5 from Graeme Lunt <graeme@xxxxxxxxxxx> 2009-07-06 02:54:08 PDT ---
(In reply to comment #3)
Fred,
> 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.
That seems to be a sensible simplication. I was concerned about calling
dissect_ber_octet_string when the octet_string wasn't constructed, but I think
this all safe.
> 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 had hit this elsewhere.
> I also updated pres.cnf in asn1/pres which can be used to build packet-pres.c.
I was trying not to provide too many files for the patch.
> 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.
Given you change, we should keep them local until someone has a use them
outside packet-ber.
> Let me know what you think.
Looks good. I'll revise and check in, and then schedule for 1.2.1.
Graeme
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.