← 返回首页
gh-153803: Raise ResponseError for a malformed struct in xmlrpc.client by tonghuaroot · Pull Request #153805 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-153803: Raise ResponseError for a malformed struct in xmlrpc.client#153805

Open
tonghuaroot wants to merge 2 commits into
python:mainfrom
tonghuaroot:xmlrpc-loads-malformed-struct
Open

gh-153803: Raise ResponseError for a malformed struct in xmlrpc.client#153805
tonghuaroot wants to merge 2 commits into
python:mainfrom
tonghuaroot:xmlrpc-loads-malformed-struct

Conversation

tonghuaroot commented Jul 16, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Unmarshaller.end_struct iterates stacked name/value items in pairs. A <member> missing its <value> leaves an odd item count, so items[i+1] raises a raw IndexError. Guard with len(items) % 2 and raise ResponseError, matching the sibling checks at lines 640 and 663.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Footer

© 2026 GitHub, Inc.