[m-rev.] for review: avoid "poison null" security vulnerabilities

Simon Taylor staylr at gmail.com
Wed Mar 14 21:33:44 AEDT 2007


On 14-Mar-2007, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> > Anyway, strings containing nulls are the wrong default, and probably
> > shouldn't be allowed at all.
> 
> I don't see why.

Because as the Perl example shows, even if you store the length
with the string, null characters are still a problem if you don't
check for them before every foreign language call that you pass a
string to.

There is such a strong tradition of using null characters for end
of string that using them for anything else is dangerous.  Given
that there are few legitimate cases where nulls should appear in
strings, it's better to avoid the problem completely and prevent
the creation of strings containing them.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list