Skip to content

Use snprintf instead of sprintf#5567

Merged
radarhere merged 2 commits intopython-pillow:masterfrom
radarhere:sprintf
Jul 1, 2021
Merged

Use snprintf instead of sprintf#5567
radarhere merged 2 commits intopython-pillow:masterfrom
radarhere:sprintf

Conversation

@radarhere
Copy link
Copy Markdown
Member

Resolves

/* FIXME: may overflow if mode is too large */

and
/* FIXME: may overflow if mode is too large */

Copy link
Copy Markdown
Member

@wiredfool wiredfool left a comment

Choose a reason for hiding this comment

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

Need to truncate the mode prior to passing to sprintf

@radarhere radarhere requested a review from wiredfool June 30, 2021 13:54
@radarhere radarhere merged commit 31c4738 into python-pillow:master Jul 1, 2021
@radarhere radarhere deleted the sprintf branch July 1, 2021 02:58
@radarhere radarhere changed the title Limit sprintf modes to 10 characters Use snprintf instead of sprintf Jul 1, 2021
radarhere added a commit to radarhere/Pillow that referenced this pull request Jul 1, 2021
@radarhere
Copy link
Copy Markdown
Member Author

This is fix for CVE-2021-34552

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