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>
This commit is contained in:
Guy Harris 2017-09-13 19:13:59 -07:00
parent 2b0e08378f
commit 4f34f4296c
1 changed files with 3 additions and 3 deletions

View File

@ -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;