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

gh-130655: Add a test for corrupt MO files in gettext by tomasr8 · Pull Request #131911 · python/cpython · GitHub

Repository navigation

gh-130655: Add a test for corrupt MO files in gettext - #131911

Merged
picnixz merged 2 commits into
python:mainfrom
tomasr8:gettext-corrupt
Apr 4, 2025
Merged

picnixz merged 2 commits into
python:mainfrom
tomasr8:gettext-corrupt

Conversation

tomasr8 commented Mar 30, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

It is possible to have a corrupt MO file where the message offsets and lengths are larger than the size of the file being parsed. gettext detects this and raises an error, however this is currently not tested. This PR adds a test for it.

bedevere-app Bot added tests Tests in the Lib/test dir awaiting review labels Mar 30, 2025
tomasr8 added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Mar 30, 2025
Comment thread Lib/test/test_gettext.py
Comment thread Lib/test/test_gettext.py

This comment was marked as resolved.

picnixz commented Mar 30, 2025

Copy link
Copy Markdown
Member

sry misclick, I wanted to abandon a pending review :')

picnixz self-requested a review March 30, 2025 19:30
picnixz enabled auto-merge (squash) April 4, 2025 13:01
picnixz disabled auto-merge April 4, 2025 13:01
picnixz enabled auto-merge (squash) April 4, 2025 13:02
picnixz merged commit a126cef into python:main Apr 4, 2025

Copy link
Copy Markdown

Thanks @tomasr8 for the PR, and @picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 4, 2025
…honGH-131911)

(cherry picked from commit a126cef)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 4, 2025
…honGH-131911)

(cherry picked from commit a126cef)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>

bedevere-app Bot commented Apr 4, 2025

Copy link
Copy Markdown

GH-132079 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Apr 4, 2025

bedevere-app Bot commented Apr 4, 2025

Copy link
Copy Markdown

GH-132080 is a backport of this pull request to the 3.12 branch.

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Apr 4, 2025

tomasr8 commented Apr 4, 2025

Copy link
Copy Markdown
Member Author

Thanks for the review @picnixz!

tomasr8 deleted the gettext-corrupt branch April 4, 2025 13:52
picnixz pushed a commit that referenced this pull request Apr 4, 2025
…-131911) (#132079)

gh-130655: Add a test for corrupt `.mo` files in `gettext` (GH-131911)
(cherry picked from commit a126cef)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
picnixz pushed a commit that referenced this pull request Apr 4, 2025
…-131911) (#132080)

gh-130655: Add a test for corrupt `.mo` files in `gettext` (GH-131911)
(cherry picked from commit a126cef)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
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

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL