Dual-license your content for inclusion in The Perl 5 Wiki using this HOWTO, or join us for a chat on irc.freenode.net#PerlNet.

Null-byte

From PerlNet

Jump to: navigation, search

The null byte, often represented as \0 in programs, or %00 in URLs, plays a special part in Perl security. Perl strings can be of any length, and can contain any characters, whereas C-strings are usually terminated by the null-byte.

A number of interesting security exploits exist by inserting null-bytes into Perl strings, resulting in Perl having a different view of the string to underlying C system calls.

This article is a stub. It is requested that it be improved and expanded. You can help PerlNet by expanding it. Once it has been improved, this message should be removed.

Personal tools