Commit 74546ed
committed
Fix heap-buffer-overflow in Swift tree-sitter scanner
The Swift external scanner called calloc(0, sizeof(ScannerState)) which
returns a 0-or-1-byte allocation per the C standard. The scanner then
writes a uint32_t (4 bytes) to this region via state->ongoing_raw_str_hash_count,
causing a heap-buffer-overflow detected by AddressSanitizer.
Fix: calloc(0, ...) → calloc(1, ...).1 parent 4fe90ca commit 74546ed
1 file changed
+1
-1
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments