Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Garbage param/preset/... names when maximum string size reached #196

Open
helgoboss opened this issue Jun 10, 2023 · 0 comments
Open

Garbage param/preset/... names when maximum string size reached #196

helgoboss opened this issue Jun 10, 2023 · 0 comments

Comments

@helgoboss
Copy link
Contributor

This is caused by a bug in the copy_string function that can cause a missing nul terminator:

memcpy(dst, src.as_ptr() as *const c_void, min(max, src.as_bytes().len()));

It should be max - 1, otherwise the nul terminator set by the previous statement will be overwritten and the C string becomes open-ended ... undefined behavior when the DAW reads this!

I'm aware that usage of this project is deprecated but I think there are still some plug-ins out there using it, so hope this helps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant