FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix out of bounds read in backend_tk. by anntzer · Pull Request #14461 · matplotlib/matplotlib · GitHub

Repository navigation

Fix out of bounds read in backend_tk. - #14461

Merged
tacaswell merged 1 commit into
matplotlib:masterfrom
anntzer:tkoutofbounds
Jun 7, 2019
Merged

tacaswell merged 1 commit into
matplotlib:masterfrom
anntzer:tkoutofbounds

Conversation

anntzer commented Jun 6, 2019

Copy link
Copy Markdown
Contributor

Really, we should specify somewhere how rounding of bboxes passed to
blit() (and to copy_from_bbox()) works, but at least this patch will
avoid out-of-bounds reads in the tk blit.

@aliaa @cgohlke I think this closes #14225, can you confirm?

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

Really, we should specify somewhere how rounding of bboxes passed to
blit() (and to copy_from_bbox()) works, but at least this patch will
avoid out-of-bounds reads in the tk blit.
anntzer added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jun 6, 2019
anntzer added this to the v3.1.1 milestone Jun 6, 2019

WeatherGod left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

makes sense as a sanitation measure. A little concerned that out-of-bounds stuff can happen, but it is probably benign.

cgohlke commented Jun 6, 2019

Copy link
Copy Markdown
Contributor

As an extra layer of protection one could raise an error in mpl_tk_blit if any values are out of bounds, e.g. height < y2 or x1 < 0 etc.

Copy link
Copy Markdown
Member

I will follow up with a PR at the c level.

timhoffm added a commit that referenced this pull request Jun 7, 2019
…461-on-v3.1.x

Backport PR #14461 on branch v3.1.x (Fix out of bounds read in backend_tk.)
anntzer deleted the tkoutofbounds branch June 7, 2019 06:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Matplotlib crashes on windows while maximizing plot window when using Multicursor

5 participants


Back | FazBrowse Home | New Git URL