upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/bcpack.cpp
diff options
context:
space:
mode:
authorwavehs <156133648+wavehs@users.noreply.github.com>2026-11-24 02:22:17 +0200
committerwavehs <156133648+wavehs@users.noreply.github.com>2026-11-24 03:30:06 +0200
commit20c7188efd82724eb32dd3baf383b0752c48a1a9 (patch)
tree756ba4f47d73c18652a8db3f8a5a4369b8fafd80 /runtime/src/bcpack.cpp
parent30daa6958bd08d4df402cdd0cb6d021ef072cd9d (diff)
saves: reject JSON nested deeper than 512 levels explicitly
Python 3.14's json decoder is iterative, so a 100,000-level JSAV body no longer raises RecursionError: parse_jsav accepted it, info printed JSAV (...), verify said OK and extract died with a 1,027-line traceback and exit 1 (json.dump recurses). The tests already expected a validation error and noted that the C decoder's limit differs by platform; the tool now checks the nesting depth itself (JSON_NESTING_LIMIT = 512, brackets inside strings ignored) in parse_jsav, in verify's per-block check and in the packed index, so a malformed save is one error line and exit 2 on every Python. (cherry picked from commit 79da3a9161fb0a238ddf4fd5179559bcd69c44a0)
Diffstat (limited to 'runtime/src/bcpack.cpp')
0 files changed, 0 insertions, 0 deletions