Commit 9d6e81d
committed
fix: replace unsafe byte indexing in parse_value with .get() + error return
Direct byte indexing (source[span.0..span.1] and source[..span.0]) panics
if yamlpath returns a span misaligned to UTF-8 boundaries, crashing the
Python process. Replace with .get() to return a recoverable PyValueError,
matching the existing safe pattern in extract().
Closes #441 parent 379171a commit 9d6e81d
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
101 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
| |||
0 commit comments