Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d49d20

Browse filesBrowse files
sdroegelu-zero
authored andcommitted
Avoid unnecessary overflow for calculating the plane size of huge frames on 64 bit architectures
On 32 bit architectures such overflow would've already failed inside the C library.
1 parent 3d3daf1 commit 2d49d20
Copy full SHA for 2d49d20

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/lib.rs‎

Copy file name to clipboardExpand all lines: src/lib.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ impl<A: PictureAllocator> AsRef<[u8]> for Plane<A> {
885885
if stride == 0 || data.is_null() {
886886
return &[];
887887
}
888-
unsafe { std::slice::from_raw_parts(data, (stride * height) as usize)) }
888+
unsafe { std::slice::from_raw_parts(data, stride as usize * height as usize) }
889889
}
890890
}
891891

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.