szn

Bug 272 — Out-of-Bounds Read in findWordBreaks (libthai Wrapper)

272. Out-of-Bounds Read in findWordBreaks (libthai Wrapper)

File: src/thai.zig:537–560 Severity: LOW Status: ❌ FALSE POSITIVE — breaks_buf is allocated with size codepoints.items.len, and th_brk_wc_find_breaks receives breaks_buf.len as the max output count. num_breaks can never exceed breaks_buf.len. The loop at line 553 iterates i < num_breaks and accesses breaks_buf[i] — always within bounds. Additionally, cell_indices.items[p] is guarded by if (p < cell_indices.items.len) at line 555.