-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path0096-av-data.rs
42 lines (37 loc) · 976 Bytes
/
0096-av-data.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*!
```rudra-poc
[target]
crate = "av-data"
version = "0.2.1"
[report]
issue_url = "https://github.com/rust-av/rust-av/issues/136"
issue_date = 2021-01-07
rustsec_url = "https://github.com/RustSec/advisory-db/pull/574"
rustsec_id = "RUSTSEC-2021-0007"
unique_bugs = 1
[[bugs]]
analyzer = "UnsafeDataflow"
guide = "Manual"
bug_class = "Other"
rudra_report_locations = ["src/frame.rs:369:5: 398:6"]
```
!*/
#![forbid(unsafe_code)]
use av_data::frame::*;
use av_data::pixel::*;
fn main() {
let yuv420: Formaton = *formats::YUV420;
let fm = std::sync::Arc::new(yuv420);
let video_info = VideoInfo {
pic_type: PictureType::I,
width: 42,
height: 42,
format: fm,
};
let mut frame = new_default_frame(MediaKind::Video(video_info), None);
frame.copy_from_raw_parts(
vec![0 as usize as *const u8; 2].into_iter(),
vec![40; 2].into_iter(),
);
println!("Program segfaults before reaching this point");
}