diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-13 19:13:59 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-14 02:15:00 +0000 |
commit | 4f34f4296c9335ddc9bb3cc8fec69b6bb1b5a079 (patch) | |
tree | 1324d0f891518d36fa8ea43306998606c40b6264 /wiretap | |
parent | 2b0e08378f6d2633e27645f5695cdae528eb23b7 (diff) |
Remove the 4 octets of junk even if that leaves no octets.
Be consistent in the treatment of those 4 octets.
Change-Id: If35c94bd299c3e7ec76306daf325d5aa5e3a19b9
Reviewed-on: https://code.wireshark.org/review/23530
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/vwr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c index 6ae9461ede..1b1919b355 100644 --- a/wiretap/vwr.c +++ b/wiretap/vwr.c @@ -1641,7 +1641,7 @@ static gboolean vwr_read_s2_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr, *err = WTAP_ERR_BAD_FILE; return FALSE; } - } else if (actual_octets > 4) { + } else { actual_octets -= 4; } @@ -2127,8 +2127,8 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr, *err = WTAP_ERR_BAD_FILE; return FALSE; } - } else if (actual_octets > 4 && (frame_size >= (int) msdu_length)) - actual_octets -=4; + } else if (frame_size >= (int) msdu_length) + actual_octets -= 4; ver_fpga = 0x11; } else { ver_fpga = 0x01; |