Skip to content

[5.0] _BodyFileSource: Fix use after free in init() #2055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Apr 1, 2019

  • init(fileURL:workQueue:dataAvailableHandler:) was using the closure
    argument for the buffer pointer outside of the closure, after
    .deallocate() was called.

(cherry picked from commit 21549ff)

- init(fileURL:workQueue:dataAvailableHandler:) was using the closure
  argument for the buffer pointer outside of the closure, after
  .deallocate() was called.

(cherry picked from commit 21549ff)
@spevans
Copy link
Contributor Author

spevans commented Apr 1, 2019

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented Apr 3, 2019

@weissi - There's no test for this but I found it when reading the source and the fix looks more correct

@weissi
Copy link
Contributor

weissi commented Apr 3, 2019

@spevans ouch, 100% agreed!

@weissi weissi merged commit 7741f0d into swiftlang:swift-5.0-branch Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants