Skip to content

Potential data overwrite when reading in chucks #19

Description

@urbytes21

Thank you for this great library. I’ve been using it and customizing it for my CDC Host application.

I noticed an issue in the read() API here:

std::memcpy(dest, ret, pxItemSize);

When reading data in multiple chunks from the ring buffer, memcpy always copies into dest without advancing the destination pointer. This overwrites previously read data.

I will push a PR for this. Please help me review. @bertmelis

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions