mirror of
https://github.com/json-c/json-c.git
synced 2026-11-06 05:30:17 +08:00
Discard the previous document's high surrogate when resetting the tokener. Otherwise the next Unicode escape can add a replacement character or combine with a surrogate from the abandoned document. Extend the existing incremental parse tests for incomplete input and a fatal error, using independent next-document string expectations. Fixes #984. Reported-by: GeekQAQ (GitHub) Assisted-by: OpenAI Codex (AI) Reviewed-by: GPT-6 Luna (AI)
31 KiB
31 KiB