Wireshark-commits: [Wireshark-commits] master-3.2 829b454: Fix the heuristic for checking whether i
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=829b454ebea2ed9e81c35a6e84ce3ab5fd33b1f0
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark
Commits:
829b454 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 8dea51c7c2675825e76757a57dd4b2877bea27a9)
Reviewed-on: https://code.wireshark.org/review/36796
Actions performed:
from 18563e4 lanalyzer: Make sure a LANalyzer file has exactly one summary record.
add 829b454 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(-)