mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix no audio issue with sample rate >= 48000 and strange crash issue
(there is some overflow in unsafe code, will test again)
This commit is contained in:
@@ -105,6 +105,9 @@ pub fn get_cursor_data(hcursor: u64) -> ResultType<CursorData> {
|
||||
bm_mask.bmHeight / 2
|
||||
};
|
||||
let cbits_size = width * height * 4;
|
||||
if cbits_size < 16 {
|
||||
bail!("Invalid icon: too small"); // solve some crash
|
||||
}
|
||||
let mut cbits: Vec<u8> = Vec::new();
|
||||
cbits.resize(cbits_size as _, 0);
|
||||
let mut mbits: Vec<u8> = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user