Potential Bug
Open
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Description
In msgpack-rust-master/rmp/src/encode/mod.rs, the comment indicates that function will panic if ty is negative.
```rust
/// # Panics
///
/// Panics if `ty` is negative, because it is reserved for future MessagePack extension including
/// 2-byte type information.
pub fn write_ext_meta(wr: &mut W, len: u32, ty: i8) -> Result> {
```
However, following test will not panic, which is inconsistent with comment.
```rust
#[test]
fn test(){
let mut buf = [0x00, 0x00];
assert_eq!(Marker::FixExt1, write_ext_meta(&mut &mut buf[..], 1, -1).unwrap());
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.