# Wild Pointer / Uninitialized Pointer

> Detects uninitialized or dangling pointer usage that can lead to arbitrary memory access.

- Skill: `zakirkun/wild-pointer-uninitialized-pointer` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/wild-pointer-uninitialized-pointer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/wild-pointer-uninitialized-pointer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/wild-pointer-uninitialized-pointer

---


# Wild / Uninitialized Pointer

## Overview
Wild pointers are pointers that have not been initialized to a valid address. Dereferencing them reads from or writes to arbitrary memory, leading to:
- Crashes (SIGSEGV)
- Data corruption
- Security vulnerabilities (if attacker controls the uninitialized memory)

Common causes:
- Pointer declared but not initialized: `int *p;` then `*p = 1;`
- Pointer used after `free()` without zeroing
- Conditional initialization where some paths skip initialization

## Remediation
- Initialize all pointers to `NULL` at declaration
- Use address sanitizers to detect wild pointer access
- Use C++ smart pointers instead of raw pointers

