install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry-data
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/memory-safety" ~/.claude/skills/majiayu000-claude-skill-registry-data-security-memory-safety && rm -rf "$T"
manifest:
data/memory-safety/SKILL.mdsource content
Memory Safety
C's primary vulnerability class. Buffer overflows, use-after-free, and integer issues remain the top attack vectors in native code.
ikigai Application
talloc mitigates but doesn't eliminate: Hierarchical ownership prevents leaks but not overflows or UAF within a context's lifetime.
Critical patterns:
- Bounds check ALL array access before use
- Validate sizes before allocation:
if (n > SIZE_MAX / elem_size) return ERR(...) - Never trust size values from external sources
- Use
not manual multiplicationtalloc_array()
Integer overflow risks:
multiplication for buffer sizessize_t- Signed/unsigned conversion in comparisons
- Off-by-one in loop bounds
Detection tools:
- ASan (
) - buffer overflow, UAFmake BUILD=sanitize - UBSan - undefined behavior, integer overflow
- Valgrind - memory errors, leaks
Review red flags: Manual pointer arithmetic,
memcpy with computed sizes, array indexing without bounds check.