Skip to content

socket.sendfile(): os.sendfile() can fail with OverflowError on 32-bit system #114077

Closed

Description

@serhiy-storchaka

Bug report

bpo-38319/gh-16491 (PR #82500) tried to fix the use of os.sendfile() for larger than 2 GiB files on 32-bit FreeBSD. But it only fixed socket.sendfile() for the case when count is false. If count is not false, blocksize is calculated as count - total_sent in the loop, and can cause an integer overflow if count is larger than 2 GiB.

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    stdlibStandard Library Python modules in the Lib/ directory
    on Jan 15, 2024
  2. added 2 commits that reference this issue on Jan 15, 2024
  3. added 2 commits that reference this issue on Jan 16, 2024
  4. added 2 commits that reference this issue on Jan 16, 2024
  5. added a commit that references this issue on Jan 17, 2024
  6. added a commit that references this issue on Jan 22, 2024
  7. added a commit that references this issue on Feb 11, 2024
  8. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions