Skip to content

Fix overflow when resizing path-to-string buffer. #10919

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
merged 1 commit into from
Mar 30, 2018

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 30, 2018

The int version of the buffer size was not updated when the buffer was
resized. It's there to prevent a signed/unsigned comparison warning, but
it's simpler just to cast the other side of the comparison. There's no
problem with the signed-to-unsigned cast since we already know that the
result is positive due to the previous check.

Fixes #10889.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

The int version of the buffer size was not updated when the buffer was
resized. It's there to prevent a signed/unsigned comparison warning, but
it's simpler just to cast the other side of the comparison. There's no
problem with the signed-to-unsigned cast since we already know that the
result is positive due to the previous check.

Fixes matplotlib#10889.
@anntzer anntzer merged commit f7b6f89 into matplotlib:master Mar 30, 2018
@tacaswell tacaswell added this to the v2.2.3 milestone Mar 30, 2018
@tacaswell
Copy link
Member

@meeseeksdev backport to 2.2.x

@lumberbot-app
Copy link

lumberbot-app bot commented Mar 30, 2018

Something went wrong ... Please have a look at my logs.

@QuLogic
Copy link
Member Author

QuLogic commented Mar 30, 2018

@meeseeksdev backport to v2.2.x

@tacaswell
Copy link
Member

🐑

phobson added a commit that referenced this pull request Mar 30, 2018
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.

memory error using savefig with ylim to create pdf of box plots
4 participants