Wireshark-commits: [Wireshark-commits] master f746d5e: Fix ASAN error due to invalid type

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 22 Apr 2014 15:47:06 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f746d5ec1daaa58802989dae8cbb731582c44d19
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

f746d5e by Peter Wu (peter@xxxxxxxxxxxxx):

    Fix ASAN error due to invalid type
    
    ei_array is supposed to be an array of expert_entry items. However, it
    was initialized of an array of expert_info_t items which is much larger.
    This caused an ASAN error when running `tshark -z expert` because
    expert_stat_packet wants to read past the stack.
    
    Fix this by correcting the type. While at it, reduce the size of
    expert_entry for 64-bit systems (reduces initial memory usage by 8
    kilobytes) and avoid a redundant g_array_index call.
    
    Change-Id: I2e08676a5e242743ed502dd2836806604ea75cc0
    Reviewed-on: https://code.wireshark.org/review/1275
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    

Actions performed:

    from  2d774c6   Minor cleanup
    adds  f746d5e   Fix ASAN error due to invalid type


Summary of changes:
 ui/cli/tap-expert.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)