rust: right condition for both uint to be zero

Theay can overflow leading to their addition to be zero

If a NFS read reply indicates a count of 0xFFFFFFFF

Bug: #4680.
(cherry picked from commit 8f8823b6f2)
pull/6635/head
Philippe Antoine 5 years ago committed by Victor Julien
parent 00cfb1ea74
commit 8b54e8fdf0

@ -179,7 +179,7 @@ impl FileTransferTracker {
SCLogDebug!("is_gap {} size {} ooo? {}", is_gap, gap_size, self.chunk_is_ooo);
}
if self.chunk_left + self.fill_bytes as u32 == 0 {
if self.chunk_left == 0 && self.fill_bytes == 0 {
//SCLogDebug!("UPDATE: nothing to do");
if self.chunk_is_last == true {
SCLogDebug!("last empty chunk, closing");

Loading…
Cancel
Save