Skip to content

cptofs short write handling appears broken #646

Description

@ddiss

On short write, copy_file() currently attempts to write any remainder from a source buffer address after the full read length.
I've not actually triggered this code-path, but it's a theoretical buffer overrun, so figured it's worth raising a ticket here. Fix:

-                               ptr += len;
+                               ptr += wrote;

I'll submit it soon, but want to add some test coverage for cptofs first.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions