Sign In

bitvec

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitvec - cargo Package Compare versions

Package version was removed
This package version has been unpublished, mostly likely due to security reasons
Comparing version
0.11.2
to
0.11.3
+18
tests/issue_15.rs
/*! Reserving space when a BitVec is filled to a boundary induces false panic.
This is due to a faulty validity check (`BitIdx::span` calls `BitIdx::is_valid`)
called during `BitVec::reserve` using the *tail* of the vector, which at the
boundary, is a valid tail but not a valid head.
This is a regression.
!*/
#![cfg(any(feature = "alloc", feature = "std"))]
use bitvec::prelude::*;
#[test]
fn issue_15() {
let mut bv = bitvec![0; 8];
bv.reserve(16);
}
+1
-1
{
"git": {
"sha1": "7eb347c383f0cb36e63a8635a14dcaec3f9c9297"
"sha1": "ef30c30199d0efc27c891e46838cf5d8265a9f50"
}
}

@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "bitvec"
version = "0.11.2"
version = "0.11.3"
authors = ["myrrlyn <self@myrrlyn.dev>"]

@@ -19,0 +19,0 @@ description = "A crate for manipulating memory, bit by bit"

@@ -7,2 +7,8 @@ # Changelog

## 0.11.3
[Issue #15]: Incorrect validity check in `BitIdx::span`; excluded tail indices
which were used in `BitVec::push`, inducing false `panic!` events. Thanks to
GitHub user [@schomatis] for the report.
## 0.11.2

@@ -337,2 +343,3 @@

[@ratorx]: https://github.com/ratorx
[@schomatis]: https://github.com/schomatis
[@torce]: https://github.com/torce

@@ -344,3 +351,4 @@ [Issue #7]: https://github.com/myrrlyn/bitvec/issues/7

[Issue #12]: https://github.com/myrrlyn/bitvec/issues/12
[Issue #15]: https://github.com/myrrlyn/bitvec/issues/15
[`Sync`]: https://doc.rust-lang.org/stable/core/marker/trait.Sync.html
[kac]: https://keepachangelog.com/en/1.0.0/

@@ -966,3 +966,3 @@ /*! Bit management

assert!(
self.is_valid::<T>(),
*self <= T::BITS,
"Index {} is invalid for type {}",

@@ -969,0 +969,0 @@ *self,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display