[Wireshark-dev] Handling malformed packet exceptions from within ASN.1 dissectors

2020-11-02 Thread Richard Sharpe
Hi folks,

I am using some of the existing ASN.1 dissectors from within the
ieee802.11 dissector, and in some cases the frame is malformed in the
ASN.1 portion.

However, since it is within an IE where I know the length of the
element, I would like to regain control and add an Expert Info and
then keep dissecting.

How can I handle this?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] Handling malformed packet exceptions from within ASN.1 dissectors

2020-11-02 Thread Anders Broman via Wireshark-dev
Hi,
I think a TRY CATCH block is the thing to use. Grep for CTACH and I think you 
will find a bunch of examples.
Regards
Anders

-Original Message-
From: Wireshark-dev  On Behalf Of Richard 
Sharpe
Sent: den 3 november 2020 00:26
To: Developer support list for Wireshark 
Subject: [Wireshark-dev] Handling malformed packet exceptions from within ASN.1 
dissectors

Hi folks,

I am using some of the existing ASN.1 dissectors from within the
ieee802.11 dissector, and in some cases the frame is malformed in the
ASN.1 portion.

However, since it is within an IE where I know the length of the element, I 
would like to regain control and add an Expert Info and then keep dissecting.

How can I handle this?

--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


smime.p7s
Description: S/MIME cryptographic signature
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] Handling malformed packet exceptions from within ASN.1 dissectors

2020-11-03 Thread Richard Sharpe
On Mon, Nov 2, 2020 at 11:57 PM Anders Broman via Wireshark-dev
 wrote:
>
> Hi,
> I think a TRY CATCH block is the thing to use. Grep for CTACH and I think you 
> will find a bunch of examples.

Yeah, I found them. But then I found that the ASN.1 dissectors already
handle the situation and my problem was elsewhere :-)

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe