eigenlsp JSON escaping is not UTF-8-safe (bypasses the #1048 chokepoint)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 4h 7m
- PR unite (30g)
- 112
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InauguralSystems/EigenScript
-
area:embed kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#1387 ·
I maintainer di solito rispondono entro 1 giorno
-
area:stdlib kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
InauguralSystems/EigenScript#1378 ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates kind:gate-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#1374 ·
I maintainer di solito rispondono entro 1 giorno
-
Error carets pad multi-byte UTF-8 byte-for-byte, so the ^ lands right of the token on a terminalApertaarea:lint-tooling kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
InauguralSystems/EigenScript#1373 ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates kind:docs-drift
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
InauguralSystems/EigenScript#1372 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
[Issue]: Headers - vx_ext_amd.h does not compile as C (enum types used without the enum keyword)Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Qiskit/qiskit#17079 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno