Closed dwlsalmeida closed 1 year ago
Researching a bit more here,
Null bytes are allowed by the spec:
String::from_utf8()
does not trim
And lastly Strings in Rust are not null-terminated (I did not know that!) : https://github.com/rust-lang/rust/issues/39295
So the comparison fails (very confusingly btw)
You could just trim the end of the str before we compare it:
https://doc.rust-lang.org/std/primitive.str.html#method.trim_end
PR is welcome.
I updated the master branch to include the change. Please test if you have the time. Make sure to have currently current stable Rust (1.70), since this enables us to remove the once_cell dependency.
Fix released with v0.5.0
Hi @hasenbanck
Sorry, I've been OOO these past few days.
I just tested v0.5.0 and it works just fine. It also does not regress on any of the libvpx test files. Thank you for the fix.
https://tempfile.io/en/mGU5snoiT6XkAs8/file