Closed fabian-z closed 7 years ago
taglib-rust fails to even open files correctly for me, because the filename passed to taglib as a C string is random memory garbage. Applying this patch makes everything work properly.
Thanks for the PR, and sorry for taking this much time to merge it.
Current CString usage appears to be incorrect and passes dangling pointers to invalid / undefined memory regions. Without these changes, taglib effectively writes nothing or only random memory garbage for me.
Fixed according to the warning in the CString docs for as_ptr(), where the current
let s = CString::new(title).unwrap().as_ptr();
style is given as an example for wrong CString usage.This should supersede #2.