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 — PyUnicode_DecodeUTF8Stateful() does not set *consumed for ASCII-only string · Issue #99612 · python/cpython

PyUnicode_DecodeUTF8Stateful() does not set *consumed for ASCII-only string #99612

New issue
Copy link
New issue
Copy link
Closed
Closed
PyUnicode_DecodeUTF8Stateful() does not set *consumed for ASCII-only string#99612
Copy link
Labels
3.10 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of liferelease-blockertopic-C-APItopic-unicodetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@serhiy-storchaka
serhiy-storchaka
opened on Nov 20, 2022
Issue body actions

PyUnicode_DecodeUTF8Stateful() should save the number of successfully decoded bytes in *consumed. But if all bytes are in the ASCII range, it uses a fast path and does not set *consumed.

It was found during writing coverage tests for Unicode C API (#99593).

Linked PRs

  • gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data #99613
  • [3.11] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) #107224
  • [3.10] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) (GH-107224) #107230
  • [3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) (GH-107224) #107231
Reacted by Michael Droettboom

Activity

Next
  1. serhiy-storchaka
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    topic-unicode
    3.11only security fixesonly security fixes
    3.10 (EOL)end of lifeend of life
    topic-C-API
    3.12only security fixesonly security fixes
    on Nov 20, 2022
  2. serhiy-storchaka
    added a commit that references this issue on Nov 20, 2022

    pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data

    8ff13de
  3. serhiy-storchaka
    added a commit that references this issue on Dec 1, 2022

    gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-…

    f08e52c
  4. carljm
    added a commit that references this issue on Dec 1, 2022

    Merge branch 'main' into fixinspect

    12f7659
  5. iritkatriel
    closed this as completedon May 13, 2023
  6. serhiy-storchaka
    added a commit that references this issue on Jul 25, 2023

    [3.11] pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-o…

    c1d4f11
  7. serhiy-storchaka
    added
    3.9 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    release-blocker
    on Jul 25, 2023
  8. serhiy-storchaka
    reopened this on Jul 25, 2023
  9. 1 remaining item

  10. github-project-automation
    moved this to Todo in Release and Deferred blockers 🚫on Jul 25, 2023
  11. serhiy-storchaka commented on Jul 25, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Jul 25, 2023
    MemberAuthor
    More actions

    Since this is a bug in the C API, I consider it as a security level fix.

  12. serhiy-storchaka
    added a commit that references this issue on Jul 25, 2023

    [3.11] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only da…

    b8b3e6a
  13. miss-islington
    added a commit that references this issue on Jul 25, 2023

    [3.11] pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-o…

    5b13e86
  14. serhiy-storchaka
    added a commit that references this issue on Jul 25, 2023

    [3.9] [3.11] pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for A…

    f72f15d
  15. gpshead
    removed
    3.11only security fixesonly security fixes
    3.12only security fixesonly security fixes
    on Jul 26, 2023
  16. ambv
    added 2 commits that reference this issue on Aug 22, 2023

    [3.10] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only da…

    1c937e5

    [3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (

    4a79328
  17. serhiy-storchaka
    removed
    3.8 (EOL)end of lifeend of life
    on Aug 23, 2023
  18. serhiy-storchaka commented on Aug 23, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Aug 23, 2023
    MemberAuthor
    More actions

    3.8 is not affected. The bug was introduced in 770847a (#81529).

  19. serhiy-storchaka
    closed this as completedon Aug 23, 2023
  20. github-project-automation
    moved this from Todo to Done in Release and Deferred blockers 🚫on Aug 23, 2023
  21. carlosroman
    added a commit that references this issue on Oct 11, 2023

    [3.9] pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-on…

    0bd646a
  22. netbsd-srcmastr
    added a commit that references this issue on Feb 20, 2024

    py-cbor2: updated to 5.6.2

    f2ebf29
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.9 (EOL)end of lifeend of liferelease-blockertopic-C-APItopic-unicodetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Release and Deferred blockers 🚫
      Status
      Done
      Show more project fields

    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.