Skip to content

bpo-36367: Free buffer if realloc fails in tokenize.c#12442

Merged
pablogsal merged 1 commit intopython:masterfrom
pablogsal:bpo36367
Mar 19, 2019
Merged

bpo-36367: Free buffer if realloc fails in tokenize.c#12442
pablogsal merged 1 commit intopython:masterfrom
pablogsal:bpo36367

Conversation

@pablogsal
Copy link
Copy Markdown
Member

@pablogsal pablogsal commented Mar 19, 2019

Copy link
Copy Markdown
Member

@matrixise matrixise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same solution, seems to be fine for me.

Copy link
Copy Markdown

@remilapeyre remilapeyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remilapeyre
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move result declaration where it's used? Python 3.8 now allows C99 ;-) (see PEP 7)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! :)

Copy link
Copy Markdown

@remilapeyre remilapeyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablogsal Yes it is, I think you patch is correct now.

@pablogsal pablogsal merged commit cb90c89 into python:master Mar 19, 2019
@pablogsal pablogsal deleted the bpo36367 branch March 19, 2019 17:18
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link
Copy Markdown

GH-12470 is a backport of this pull request to the 2.7 branch.

@bedevere-bot
Copy link
Copy Markdown

GH-12471 is a backport of this pull request to the 3.7 branch.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants