Wireshark-commits: [Wireshark-commits] master-2.6 2e6b686: Fix the heuristic for checking whether i
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2e6b6865b688e9b2ffc51532767c34fc8f9fd345
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark
Commits:
2e6b686 by Guy Harris (guy@xxxxxxxxxxxx):
Fix the heuristic for checking whether it's a CAM Inspector file.
wtap_read_bytes() returns TRUE on *success*, so if we're in the loop,
the last read succeeded, and no error code was supplied. When we *exit*
the loop, the read didn't succeed; check for the status then. If we got
a short read, we ran out of file data, so check the heuristics (even if
it's not an integral number of 2-byte blocks, treat it as a CAM
Inspector file - it might have gotten cut short); if we got a real read
error, report that to our caller.
Bug: 16458
Change-Id: Ia1e838006744dadbc2883459aec16d0d11b732e1
Reviewed-on: https://code.wireshark.org/review/36795
Petri-Dish: Guy Harris <gharris@xxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
(cherry picked from commit d8615d27b4ff168bc438576ca94fd41192579256)
Reviewed-on: https://code.wireshark.org/review/36798
Actions performed:
from da542af lanalyzer: Make sure a LANalyzer file has exactly one summary record.
add 2e6b686 Fix the heuristic for checking whether it's a CAM Inspector file.
Summary of changes:
wiretap/camins.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)