Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
This repository was 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

Description

@helgoboss

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions