<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Use NULL in vararg



On Mon, 08 Nov 2004 23:46:36 +0100, Matthias Andree said:

> OK, it may fix random character roulette on some 64bit systems, but it
> will still bomb out on a lot of systems (SIGSEGV). %s and (void *)0
> don't mix well unless you're using glibc.

It is important to fix that even if printf later dies with a segv.

Dereferencing a NULL pointer is not serious exploit wise: Almost all
OSes don't map the first first page so that dereferencing of NULL will
for sure raise SIGSEGV.  Allowing to dereference any other bad
addresses may cause serious harm.   Systems with sizeof (int) !=
sizeof (void*) are quite common these days.


Shalom-Salam,

   Werner