Kijewski / Kijewski/pyjson5

loads: OverflowError while decoding too big escaped Unicode character

Open
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Cython
Stars
179
Forks
16
PR merge metrics
No merged PRs in 30d

Description

pyjson5.loads(r'{\U11111111: 2}')

File src/_decoder.pyx:509, in pyjson5.pyjson5._decode_identifier_name()

File src/_decoder.pyx:113, in pyjson5.pyjson5._get_hex_character()

File src/_raise_decoder.pyx:39, in pyjson5.pyjson5._raise_expected_s()

OverflowError: %c arg not in range(0x110000)

Should raise a Json5DecoderException instead

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown pyjson5.loads call, then inspect src/_decoder.pyx:509 and _get_hex_character at line 113. Trace how the oversized escaped Unicode value is handled, and confirm that the same input raises Json5DecoderException rather than OverflowError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.