Skip to content

Commit fa66d4f

Browse files
authored
Merge pull request #95 from glebm/patch-1
string_pool.rs: Fix UB
2 parents d511655 + 9c7e1e4 commit fa66d4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/string_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Drop for Chunk {
4747
// have a destructor. This means the len doesn't matter, only
4848
// the capacity.
4949
unsafe {
50-
Vec::from_raw_parts(self.start, self.capacity, self.capacity);
50+
Vec::from_raw_parts(self.start, 0, self.capacity);
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)