Skip to content

Retrying is broken in Generic_Write. #7

Description

@Rombobeorn

POSIX.IO.Generic_Write tries to write repeatedly, but will break if it doesn't get to write the whole amount in the first attempt.

If the first attempt consumes less than half of the data, then Generic_Write sets the size too small in the second attempt, because it subtracts the written amount twice: first on line 485, and then again on line 481 in the next iteration.

If the first attempt consumes more than half of the data but not all of it, then there will be an integer underflow when To_Write < Written on line 481.

Change "To_Write - Written" to just "To_Write" on line 481, like this:
Blady-Com/florist@c485477

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