mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-30 19:45:36 +00:00
- Add len==0 check in set_contains() to prevent buffer overflow - Add missing stdlib.h include in scanner.c - Clear heredoc stack properly in deserialize when length==0 - Ensure NUL termination in delimiter deserialization - Create alloc.c to define ts_current_* symbols for TREE_SITTER_REUSE_ALLOCATOR All changes tested with full test suite: 61/61 tests passing. Addresses PR #1 review comments from CodeRabbit.
10 lines
301 B
C
10 lines
301 B
C
#include "tree_sitter/alloc.h"
|
|
#include <stdlib.h>
|
|
|
|
#ifdef TREE_SITTER_REUSE_ALLOCATOR
|
|
void *(*ts_current_malloc)(size_t) = malloc;
|
|
void *(*ts_current_calloc)(size_t,size_t) = calloc;
|
|
void *(*ts_current_realloc)(void*,size_t) = realloc;
|
|
void (*ts_current_free)(void*) = free;
|
|
#endif
|