We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d9528d commit eb54606Copy full SHA for eb54606
1 file changed
mp4parse_capi/src/lib.rs
@@ -499,6 +499,7 @@ impl Read for Mp4parseIo {
499
}
500
let rv = self.read.unwrap()(buf.as_mut_ptr(), buf.len(), self.userdata);
501
if rv >= 0 {
502
+ assert!(rv as usize <= buf.len(), "read callback returned more bytes than buffer size");
503
Ok(rv as usize)
504
} else {
505
Err(std::io::Error::other("I/O error in Mp4parseIo Read impl"))
0 commit comments