Skip to content

Commit 2095aa4

Browse files
committed
move to wrapping_add on untrusted join
1 parent cb88dca commit 2095aa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spsc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ impl SharedQueueHeader {
463463
actual: header.version,
464464
});
465465
}
466-
if header.buffer_mask as usize + 1
466+
if (header.buffer_mask as usize).wrapping_add(1)
467467
!= Self::calculate_buffer_size_in_items::<T>(file_size)?
468468
{
469469
return Err(Error::InvalidBufferSize);

0 commit comments

Comments
 (0)