diff options
author | Alessandro Gatti <a.gatti@frob.it> | 2025-04-17 16:56:11 +0200 |
---|---|---|
committer | Alessandro Gatti <a.gatti@frob.it> | 2025-05-19 02:09:40 +0200 |
commit | 9ef16b466bf980a3b3e0980e7d010b0b9130569b (patch) | |
tree | e607bcd3538751be3a0b51e058bbaa7d856f247e /unix/modmachine.c | |
parent | 7a55cb6b364fdbc2f3291456643bd640ba566ec9 (diff) | |
download | micropython-9ef16b466bf980a3b3e0980e7d010b0b9130569b.tar.gz micropython-9ef16b466bf980a3b3e0980e7d010b0b9130569b.zip |
extmod/modjson: Detect unterminated composite entities.
This commit makes the JSON parser raise an exception when handling
objects or arrays whose declaration is incomplete, as in missing the
closing marker (brace or bracket) and if the missing marker would have
been the last non-whitespace character in the incoming string.
Since CPython's JSON parser would raise an exception in such a case,
unlike MicroPython's, this commit aligns MicroPython's behaviour with
CPython.
This commit fixes issue #17141.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'unix/modmachine.c')
0 files changed, 0 insertions, 0 deletions