Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

eigenlsp JSON escaping is not UTF-8-safe (bypasses the #1048 chokepoint)

Open
#1,336 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
compilers, tooling

Research direction

Start at eigenlsp's json_escape_to and compare it with the eigs_utf8_sanitize and lint_json_escape path; inspect tools/lint_diag_writers.sh and how it handles eigenlsp emitters. Done means the escaping and fixed-buffer truncation are UTF-8-safe, the emitter coverage is addressed, and the 320-byte-edge syntax-error case produces valid UTF-8 JSON-RPC.

Written by the indexing model from the issue text.

Description

area:lint-tooling found-by:critic kind:silent-wrong

Found by the blind critic on PR #1332, and pre-existing on main.

eigenlsp's json_escape_to does not validate UTF-8, and its "syntax error: %s" snprintf into full[320] can cut a multi-byte character in half. The lint path is protected by eigs_utf8_sanitize and lint_json_escape (#1048), but this LSP path bypasses both. No input that feeds it multi-byte text was found today, so this is latent.

Done when

  • eigenlsp's JSON escaping goes through the same UTF-8-safe chokepoint as --lint --json, or an equivalent one, and its fixed buffers truncate on character boundaries.
  • tools/lint_diag_writers.sh (#1332) derives eigenlsp's JSON emitters too, or the PR states why they are out of its population.
  • Calibrated once: a syntax error whose message carries a multi-byte character at the 320-byte edge produces valid UTF-8 JSON-RPC.
Dominant language
C
Stars
3
Forks
7
Avg merge
3h 58m
Merged PRs (30d)
105

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from InauguralSystems/EigenScript

All issues in InauguralSystems/EigenScript

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.