alfg / alfg/mp4-rust

read_null_terminated_utf8_string does not check box bounds

Open
#157 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
355
Forks
105
PR merge metrics
No merged PRs in 30d

Description

It is possible for a bad source file to read beyond the end of the box returning a bogus string. This will cause error downstream in areas such as in Emsg reader:

let message_size = size - Self::size_without_message(version, &scheme_id_uri, &value);
let mut message_data = Vec::with_capacity(message_size as usize);
reader.read_exact(&mut message_data)?;

The message will not be able to read correctly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.