Null pointer deref

From zakirkun/ice-tea · View interactive version

Null pointer deref is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects code that dereferences pointers or return values that could be NULL without validation, causing crashes or privilege escalation.

How to use this skill

Skill file

Null Pointer Dereference

Overview

Null pointer dereference occurs when code uses a pointer without checking whether it's NULL. This causes:

Detection Strategy

Remediation

Always check pointers for NULL before dereferencing.

Vulnerable (C):

char *buf = malloc(256);
strcpy(buf, input); // buf might be NULL if malloc failed!

Safe (C):

char *buf = malloc(256);
if (buf == NULL) { perror("malloc"); exit(1); }
strcpy(buf, input);
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.