GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS · Issue #96848 · python/cpython

Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS #96848

New issue
Copy link
New issue
Copy link
Closed
Closed
Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS#96848
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on Sep 15, 2022
Issue body actions

python -X int_max_str_digits command is invalid:

$ python -X int_max_str_digits
Fatal Python error: config_init_int_max_str_digits: -X int_max_str_digits: invalid limit; must be >= 640 or 0 for unlimited.
Python runtime state: preinitialized

But if PYTHONINTMAXSTRDIGITS environment variable is defined, the invalid option is no longer rejected:

$ PYTHONINTMAXSTRDIGITS=5000 python -X int_max_str_digits
Python 3.12.0a0 (heads/main:e37ac5fbb6, Sep 15 2022, 15:03:41) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

It's just because the valid variable in config_init_int_max_str_digits() is not initialized again in the -X option code path, after the env var is parsed.

I noticed this minor issue while backporting the change to Python 3.6 in Fedora for Red Hat.

cc @tiran @gpshead

Reacted by Gregory P. Smith and Charlie Zhao
Reacted by Artёm Chernitsa

Activity

Next
  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Sep 15, 2022
  2. vstinner commented on Sep 15, 2022

    @vstinner
    vstinner
    on Sep 15, 2022
    MemberAuthor
    More actions

    The code was introduced by the issue #95778.

  3. gpshead commented on Sep 15, 2022

    @gpshead
    gpshead
    on Sep 15, 2022
    Member
    More actions

    Nice find. "Oops!" We're obviously missing an integration test for this situation. At least this scenario should be uncommon.

  4. gpshead
    added
    3.11only security fixesonly security fixes
    3.10 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    3.7 (EOL)end of lifeend of life
    3.12only security fixesonly security fixes
    on Sep 15, 2022
  5. miss-islington
    added a commit that references this issue on Sep 26, 2022

    pythongh-96848: Fix -X int_max_str_digits option parsing (pythonGH-96988

    3f2527d
  6. vstinner
    added a commit that references this issue on Sep 26, 2022

    gh-96848: Fix -X int_max_str_digits option parsing (#96988)

    4135166
  7. miss-islington
    added 4 commits that reference this issue on Sep 26, 2022

    pythongh-96848: Fix -X int_max_str_digits option parsing (pythonGH-96988

    e4284cb

    pythongh-96848: Fix -X int_max_str_digits option parsing (pythonGH-96988

    cc89be6

    pythongh-96848: Fix -X int_max_str_digits option parsing (pythonGH-96988

    8dcc5b3

    gh-96848: Fix -X int_max_str_digits option parsing (GH-96988)

    a4ff0ea
  8. 12 remaining items

  9. stratakis
    added 3 commits that reference this issue on Mar 20, 2024

    00387: CVE-2020-10735: Prevent DoS by very large int()

    758fc4a

    00387: CVE-2020-10735: Prevent DoS by very large int()

    c91ac07

    00387: CVE-2020-10735: Prevent DoS by very large int()

    761bd73
  10. hroncok
    added a commit that references this issue on Mar 26, 2024

    00387: CVE-2020-10735: Prevent DoS by very large int()

    31235df
  11. mcepl
    added 3 commits that reference this issue on Apr 2, 2024

    00387: CVE-2020-10735: Prevent DoS by very large int()

    b030834

    [CVE-2020-10735] prevent DoS by very large int()

    a5edd97

    [CVE-2020-10735] prevent DoS by very large int()

    13c4aa4
  12. mcepl
    added 2 commits that reference this issue on Apr 11, 2024

    [CVE-2020-10735] prevent DoS by very large int()

    af7dd20

    [CVE-2020-10735] prevent DoS by very large int()

    cb3cee8
  13. mcepl
    added 2 commits that reference this issue on Apr 25, 2024

    [CVE-2020-10735] prevent DoS by very large int()

    a6a0348

    [CVE-2020-10735] prevent DoS by very large int()

    e091acd
  14. hrnciar
    added a commit that references this issue on Apr 23, 2025

    00387: CVE-2020-10735: Prevent DoS by very large int()

    3181653
  15. hroncok
    added a commit that references this issue on Jul 4, 2025

    00387: CVE-2020-10735: Prevent DoS by very large int()

    e9711a4
  16. frenzymadness
    added a commit that references this issue on Aug 12, 2025

    00387: CVE-2020-10735: Prevent DoS by very large int()

    8ca7e29
  17. hroncok
    added a commit that references this issue on Feb 3, 2026

    00387: CVE-2020-10735: Prevent DoS by very large int()

    ad716c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.