Skip to content

Commit 847b441

Browse files
committed
Avoid overflow ptr arithmetic at the end
Thanks again miri!
1 parent c3f7d46 commit 847b441

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/raw/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,9 @@ impl<T> RawIter<T> {
14561456
return;
14571457
}
14581458

1459-
if b.as_ptr() <= self.iter.data.next_n(Group::WIDTH).as_ptr() {
1459+
if self.iter.next_ctrl < self.iter.end
1460+
&& b.as_ptr() <= self.iter.data.next_n(Group::WIDTH).as_ptr()
1461+
{
14601462
// The iterator has not yet reached the bucket's group.
14611463
// We don't need to reload anything, but we do need to adjust the item count.
14621464

0 commit comments

Comments
 (0)