Wireshark-bugs: [Wireshark-bugs] [Bug 5754] Buildbot crash output: fuzz-2011-03-15-11832.pcap

Date: Thu, 17 Mar 2011 06:01:27 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5754

Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darkjames@xxxxxxxxxxxxxxxx

--- Comment #5 from Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx> 2011-03-17 06:01:23 PDT ---
(In reply to comment #4)
> Although I don't know the code, a quick look suggests that if last_ava isn't
> properly initialized in the following then ava_hf_index won't be properly
> initialized either.
> 
> [cut]
> 
> What do you think ?

Hmm, right.

so better (?) fix would be to catch exceptions inside
dissect_x509if_AttributeValueAssertion() which restores ava_hf_index.

something like: 
#v+
ava_hf_index = hf_index;
last_ava = ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0';
TRY {
   dissect_ber_sequence(..);
} CATCH_ALL {
   ava_hf_index=-1;
   RETHROW;
}
ava_hf_index = -1;
#v-
?

It might be good idea to initialize global ava_hf_index to -1 also.

Eh... global variables sucks ;/

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