Wireshark-commits: [Wireshark-commits] master-2.0 1965249: [ICMP] use abs() in detecting timestamp

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 9 Dec 2016 22:11:43 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=196524963959860c26b0c4f8640eed4a86ab0373
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark

Commits:

1965249 by Michael Mann (mmann78@xxxxxxxxxxxx):

    [ICMP] use abs() in detecting timestamp heuristics
    
    The code was making the assumption that the ICMP data time will always
    be greater than or equal to the frame time, but not earlier, but that
    is not always the case and the heuristics can fail.
    
    # Conflicts:
    #	epan/dissectors/packet-icmp.c
    
    Bug: 13161
    Change-Id: I4bc7bd8d22d717d3b1f08afdd651f8a70cb7aef2
    Reviewed-on: https://code.wireshark.org/review/19157
    Petri-Dish: Michael Mann <mmann78@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    (cherry picked from commit f60ec2581ae825f89e669ca4b4f14917a2aab561)
    Reviewed-on: https://code.wireshark.org/review/19186
    

Actions performed:

    from  3e30990   Add a comment explaining how a compiler bug where it's overly optimizing a combination of tests could cause the valgrind errors we were seeing, so we're zeroing the entire structure, padding included, to avoid that.
    adds  1965249   [ICMP] use abs() in detecting timestamp heuristics


Summary of changes:
 epan/dissectors/packet-icmp.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)