-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add decompression bomb check to grabclipboard() on Windows #10078
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -461,8 +461,10 @@ PyImaging_GrabClipboardWin32(PyObject *self, PyObject *args) { | |||||||||||||
| void *data; | ||||||||||||||
| PyObject *result; | ||||||||||||||
| UINT format; | ||||||||||||||
| // Windows clipboard format identifiers | ||||||||||||||
| UINT formats[] = {CF_DIB, CF_DIBV5, CF_HDROP, RegisterClipboardFormatA("PNG"), 0}; | ||||||||||||||
| LPCSTR format_names[] = {"DIB", "DIB", "file", "png", NULL}; | ||||||||||||||
| // For format_name in ImageGrab.py, in the same order as the formats above | ||||||||||||||
| LPCSTR format_names[] = {"DIB", "DIB", "file", "PNG", NULL}; | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ...they're not exactly 'Pillow format names'. 'DIB' and 'PNG are, but 'file' isn't.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair:
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've pushed a similar comment, that connects it clearly to the variable in ImageGrab.py. |
||||||||||||||
|
|
||||||||||||||
| if (!OpenClipboard(NULL)) { | ||||||||||||||
| // Maybe the clipboard is temporarily in use by another process. | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.